Skip to content

Exceeding complexity returns 500 http status code #5116

Closed

Description

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Actual behavior
When the request exceeds the complexity quota it returns 500 status code, which symbolized it is BE issue. However, the issue on the client-side is sending a too complex query.

Example of the response:
image

Expected behavior
I would be expecting that the returned response code is 400, basically the same behavior in case of an invalid query.

This particular example is mentioned in gql over http spec, and even there it says that BE should return Bad Request.

image

Steps to reproduce

  1. Enable the Complexity option
  2. Create a request that exceeds the complexity
  3. The response contains the correct error, but HTTP status code is 500

Relevant log output

No response

Additional Context?

No response

Product

Hot Chocolate

Version

12.9.0

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

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions