Ticket Created
over 5 years ago

WERETECH-8758

Wrong response code when using makeImageRequest

Hi,

I'm using the makeImageRequest to request some image.

Sometimes, the server returns a 401 status code but the value of the response code in the callback is 404.

As long as there is this problem, I don't know how to differentiate errors.

Please note that in spite of a very close signature, there is no problem with the markeWebRequest method.

Best regards,

Parents
  • [quote userid="123172" url="~/developer/connect-iq/f/q-a/219814/wrong-response-code-when-using-makeimagerequest/1040870"]Is there a chance that this problem will be corrected in a future release ?[/quote] I alone don't get to decide what is a bug and what isn't, but I can report it and see what happens. In my mind, the image processing service should: immediately return a non-200 response code to the calling application. attempt to process the response payload for responses with a 200 response code. if an error occurs during image processing, then a suitable error code could be returned (a 4xx or 5xx code seems reasonable, but 400, 417, 424, 499 or 500 seem fair) never return 404 unless the file is not found. It is likely that if a fix is made, it will need to be made to several pieces of software... the image processing service, Garmin Connect Mobile iOS/Android, device firmware (including the ConnectIQ VM), and the ConnectIQ simulator would all need to be audited and possibly fixed. Something like this will take a while.
Comment
  • [quote userid="123172" url="~/developer/connect-iq/f/q-a/219814/wrong-response-code-when-using-makeimagerequest/1040870"]Is there a chance that this problem will be corrected in a future release ?[/quote] I alone don't get to decide what is a bug and what isn't, but I can report it and see what happens. In my mind, the image processing service should: immediately return a non-200 response code to the calling application. attempt to process the response payload for responses with a 200 response code. if an error occurs during image processing, then a suitable error code could be returned (a 4xx or 5xx code seems reasonable, but 400, 417, 424, 499 or 500 seem fair) never return 404 unless the file is not found. It is likely that if a fix is made, it will need to be made to several pieces of software... the image processing service, Garmin Connect Mobile iOS/Android, device firmware (including the ConnectIQ VM), and the ConnectIQ simulator would all need to be audited and possibly fixed. Something like this will take a while.
Children
No Data