HttpUtils throws exception

thedesolatesoul

Expert
Licensed User
Longtime User
This is maybe not a B4A question but more of a system-level question.

Sometimes on an upload the Http Client (using HTTPUtils) throws this exception:

B4X:
org.apache.http.client.ClientProtocolException

Caused by: org.apache.http.client.NonRepeatableRequestException: Cannot retry request with a non-repeatable request entity
The stack trace contains internal HTTPClient traces.
It seems that the InputStream does not allow a repeatable request.

This however does not always happen. When I manually start a Job, the upload goes fine. But when I try to schedule an upload job at some time, the first upload fails but subsequent ones work fine.

If it is the server being slow to respond, then why does it work on a manual job start.

Shall I be detecting this exception in HandleErrors and try to re-start the job?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…