Open ajs97 opened 3 years ago
void HandleException(const azure::storage::storage_exception& e) { auto result = e.result(); int http_status_code = result.http_status_code(); auto extended_error = result.extended_error();
if (http_status_code == 416) {
// Handle the InvalidRange error here
std::cout << "Received InvalidRange error: " << e.what() << std::endl;
} else {
// Handle other errors
std::cout << "HTTP Status Code: " << http_status_code
<< " , error_code: " << extended_error.code()
<< " , error message: " << e.what() << std::endl;
}
}
I have added the error handling code, and this particular error does not have the error code present in the
storage_exception
. I added this logging:I don't get the error code for the
InvalidRange
error:Is this expected? Is there any other error which will return status code 416, or is
InvalidRange
the only one that has 416?