Skip to content

The responseHandler should respect Content-Type headers #2354

Closed
@taylorkline

Description

@taylorkline

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 with PARSING_ERROR in some rather common use-cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions