-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
The responseHandler should respect Content-Type headers #2354
Milestone
Comments
taylorkline
added a commit
to taylorkline/redux-toolkit
that referenced
this issue
May 27, 2022
This was referenced May 31, 2022
phryneas
pushed a commit
to taylorkline/redux-toolkit
that referenced
this issue
Jul 8, 2022
Oh hey this has been long merged and will be in 1.9. |
taylorkline
changed the title
The default responseHandler should respect Content-Type headers
The responseHandler should respect Content-Type headers
Oct 26, 2022
@markerikson I changed the title, as there is now an option to respect Content-Type headers, but it is not the default. |
Thanks for solving this problem.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Howdy!
I believe the default responseHandler should be a little more intelligent to handle the response based on the content type header.
For example, in the default Go http package, you can see it is typical to return a response body of "404 page not found", "Unauthorized," etc. with non-200 responses.
It seems very counterintuitive that one must define a custom
responseHandler
for each and every endpoint to avoid RTK Query failing withPARSING_ERROR
in some rather common use-cases.The text was updated successfully, but these errors were encountered: