Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use HTTP status code as error code if provided body cannot be parsed. #1380

Conversation

jeskew
Copy link
Contributor

@jeskew jeskew commented Mar 1, 2017

If a response is received that cannot be parsed, the SDK should treat the response just as if a response with no body had been received.

This should resolve #1379, and I don't believe there are any BC concerns here.

/cc @chrisradek

@jeskew jeskew force-pushed the fix/build-service-error-from-http-code-when-body-unparsable branch from fc2d687 to 061486a Compare March 1, 2017 05:32
@coveralls
Copy link

coveralls commented Mar 1, 2017

Coverage Status

Coverage increased (+0.01%) to 91.645% when pulling 061486a on jeskew:fix/build-service-error-from-http-code-when-body-unparsable into 975b315 on aws:master.

@jeskew jeskew changed the title Use HTTP status code as error message if provided body cannot be parsed. Use HTTP status code as error code if provided body cannot be parsed. Mar 1, 2017
@chrisradek
Copy link
Contributor

Awesome!
Can you also update the request.d.ts definition to include the statusMessage:
https://github.com/aws/aws-sdk-js/blob/master/lib/request.d.ts#L125
and update the request documentation:
https://github.com/aws/aws-sdk-js/blob/master/lib/request.js#L249-L254

@jeskew jeskew force-pushed the fix/build-service-error-from-http-code-when-body-unparsable branch from dc2d4be to d9edd67 Compare March 2, 2017 00:28
@jeskew jeskew force-pushed the fix/build-service-error-from-http-code-when-body-unparsable branch from f266fec to f68b328 Compare March 2, 2017 06:25
@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 91.648% when pulling f68b328 on jeskew:fix/build-service-error-from-http-code-when-body-unparsable into 3fc5ce6 on aws:master.

@chrisradek
Copy link
Contributor

:shipit:

@jeskew jeskew merged commit fb2fef7 into aws:master Mar 10, 2017
@jeskew jeskew deleted the fix/build-service-error-from-http-code-when-body-unparsable branch March 10, 2017 01:13
@lock
Copy link

lock bot commented Sep 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When AWS is down, JSON parser breaks...
3 participants