Skip to content

Return 4XX instead of 5XX for client errors #7128

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

Closed
cmeeren opened this issue May 28, 2024 · 2 comments
Closed

Return 4XX instead of 5XX for client errors #7128

cmeeren opened this issue May 28, 2024 · 2 comments

Comments

@cmeeren
Copy link
Contributor

cmeeren commented May 28, 2024

Product

Hot Chocolate

Version

14.0.0-p.101

Steps to reproduce

If the client requests more than the maximum number of items during pagination (HC0051), the request responds with status code 500. This is incorrect; it is a client error, so it should return 400.

This issue hits us by triggering the HTTP retry policy for requests that are pointless to retry. (The policy retries 5XX requests, among other things.)

Hopefully this is trivial to repro, or even just find the relevant code. Let me know if you need a repro.

@michaelstaib
Copy link
Member

This should be solved. Graphql runtime errors are now 200 like the spec defines.

@cmeeren
Copy link
Contributor Author

cmeeren commented Jun 5, 2024

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants