Replies: 2 comments
-
It's probably best to wait until this has advanced beyond the Proposed Standard stage, which is the introductory level for IETF RFCs. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm going to convert this to a Proposal for consideration. However I will say that as part of our ongoing work for single fetch we are already looking into on some ways to let the React Router consumer customize the response parsing: #11029. So I think that will eventually be your solution here - rather than RR trying to internally handle every content type under the sun. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What version of React Router are you using?
6.17.0
Steps to Reproduce
RFC 7807/9457 introduced a extensible format for json error response, and a dedicated Content-Type : "application/problem+json".
Some server framework start to respond with this Content-Type on error (Spring Framework 6 for example).
When these responses are returned on a loader or action, the resulting response is used as text instead of a json:
(packages/router/router.ts#L3925)
Would it be possible to add the new Content Type ?
Expected Behavior
useLoaderData or useActionData returns a Javascript object
Actual Behavior
useLoaderData or useActionData returns a string
Beta Was this translation helpful? Give feedback.
All reactions