Skip to content

Conversation

@JimPatterson
Copy link

@JimPatterson JimPatterson commented Oct 20, 2021

The createError function was incorrectly assuming that response
bodies are in JSON format and attempting to extract useful details
from that body. But, for some error cases, the body is not JSON
resulting in a error being thrown during the process of adding
details to the error.

This fix adds safeguards around the places that need JSON to enable
the createError method to extract the useful details.

This likely fixes #110 and fixes #118.

The createError function was incorrectly assuming that response
bodies are in JSON format and attempting to extract useful details
from that body.  But, for some error cases, the body is not JSON
resulting in a error being thrown during the process of adding
details to the error.

This fix adds safeguards around the places that need JSON to enable
the createError method to extract the useful details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.getJSON method invoked on xml throws sdk error, masking the original problem Handle 401 AuthorizationFailure response

1 participant