You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The AzureIoTHTTP_RequestSize function is used to get a resource size before downloading it. Its return value is the resource size or -1 on error.
Issue
When a network error occurs, especially the HTTPStatus::HTTPNoResponse one, there is no way to know and take a remediating action, like retrying the call.
Suggestions
A) Change the function contract to return a HTTPStatus and add an out parameter to return the resource size.
Downside: breaking change.
B) Add a int32_t lLastError field on the AzureIoTHTTPHandle_t structure and create an AzureIoTHTTP_GetLastError function.
Downside: 4 bytes and instrumenting all functions to set the error field with the last error received.
Is there an existing issue for this?
Version
1.1.0
Description of the issue
Context
The
AzureIoTHTTP_RequestSize
function is used to get a resource size before downloading it. Its return value is the resource size or-1
on error.Issue
When a network error occurs, especially the
HTTPStatus::HTTPNoResponse
one, there is no way to know and take a remediating action, like retrying the call.Suggestions
A) Change the function contract to return a
HTTPStatus
and add anout
parameter to return the resource size.Downside: breaking change.
B) Add a
int32_t lLastError
field on theAzureIoTHTTPHandle_t
structure and create anAzureIoTHTTP_GetLastError
function.Downside: 4 bytes and instrumenting all functions to set the error field with the last error received.
Expected behavior
Know what error occurred with the
AzureIoTHTTP_RequestSize
function.Steps to reproduce the issue
No response
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: