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
Currently, in responseError the http.Response body is decoded into a jiradata.ErrorCollection{}. For some errors, like 401 Unauthorized, this results in a JSON parse failure because the response body is not a JSON object.
The error that is returned contains the parse failure but there's no way to determine the StatusCode or Status of the response. I can guess at the failure by checking to see if the error returned is a jiradata.ErrorCollection and assuming the error is a non-200 response, but it would be nice to have a way to check more explicitly for the Status.
The text was updated successfully, but these errors were encountered:
Hey, I just committed a change that should address this issue. We now set the Status always and append to ErrorMessages if there is a json parse error.
Currently, in
responseError
thehttp.Response
body is decoded into ajiradata.ErrorCollection{}
. For some errors, like 401 Unauthorized, this results in a JSON parse failure because the response body is not a JSON object.The error that is returned contains the parse failure but there's no way to determine the
StatusCode
orStatus
of the response. I can guess at the failure by checking to see if the error returned is ajiradata.ErrorCollection
and assuming the error is a non-200 response, but it would be nice to have a way to check more explicitly for theStatus
.The text was updated successfully, but these errors were encountered: