Repository navigation
fix: better error for invalid content type - #5653
Closed
juliusmarminge wants to merge 2 commits into
Closed
juliusmarminge wants to merge 2 commits into
juliusmarminge wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Contributor
Diagnostics ComparisonDetailsNumbers
Timings and averages
unstable timingsUnstable
|
KATT
approved these changes
Apr 21, 2024
| "stack": "[redacted]", | ||
| }, | ||
| "message": "Invalid Content-Type header. This request may not be supported by your tRPC Adapter, or possibly by tRPC at all", | ||
| "message": "Invalid Content-Type header 'undefined'. This request may not be supported by your tRPC Adapter, or possibly by tRPC at all", |
Member
There was a problem hiding this comment.
Maybe another error than "undefined" for missing ones? 👀
Nick-Lucas
reviewed
Apr 21, 2024
| handler = h; | ||
| break; | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
As discussed in discord, I think best to do this in a way which is fairly linear. iterating over and taking a match object from the last in the chain seems to create complexity
We probably want to already know the header at this level in the stack and just ask the content handler if it can handle that type?
Contributor
|
This pull request has been locked because we are very unlikely to see comments on closed issues. If you think, this PR is still necessary, create a new one with the same branch. Thank you. |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
improves error for easier debuggability when no content type handler is found