-
-
Notifications
You must be signed in to change notification settings - Fork 933
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
JSON shortcut does not work when using throwHttpErrors: false #1540
Labels
Comments
why have you closed this issue ?
Code above throws exception
|
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When the server returns an error code with JSON body, and I try to parse it using
.json()
and{throwHttpErrors: false}
, I get the following error:Actual behavior
TypeError is thrown
Expected behavior
Returning the body of response, parsed as JSON (matching the behavior of
{responseType: 'json', resolveOnlyBody: true}
, as documented)Code to reproduce
https://runkit.com/embed/3tt06wxjbio1
Checklist
The text was updated successfully, but these errors were encountered: