guac icon indicating copy to clipboard operation
guac copied to clipboard

Fixed Issue: #2195 500 error when sending empty JSON payload to Graph...

Open 000xs opened this issue 1 year ago • 1 comments

Fixed Issue: #2195 500 error when sending empty JSON payload to Graph…

Description of the PR

This pull request addresses an issue where the GraphQL server returned a 500 internal server error when an empty or invalid JSON payload was sent to the /query endpoint.

Changes:

  • Error handling: Updated the server to return a 400 bad request instead of 500 for invalid JSON input.
  • Error message: Improved the error message to provide more context about the issue.

PR Checklist

  • [x] All commits have a Developer Certificate of Origin (DCO) -- they are generated using -s flag to git commit.
  • [x] All new changes are covered by tests
  • [ ] If GraphQL schema is changed, make generate has been run
  • [ ] If GraphQL schema is changed, GraphQL client updates/additions have been made
  • [ ] If OpenAPI spec is changed, make generate has been run
  • [ ] If ent schema is changed, make generate has been run
  • [ ] If collectsub protobuf has been changed, make proto has been run
  • [x] All CI checks are passing (tests and formatting)
  • [x] All dependent PRs have already been merged

000xs avatar Oct 18 '24 06:10 000xs

Can you remove the changes to the files that are not relevant to this PR? Looks like you had an incomplete merge conflict resolution?

mihaimaruseac avatar Oct 20 '24 15:10 mihaimaruseac

This pull request has been automatically marked as stale because it has not had recent activity (60 days of inactivity). It will be closed in 30 days if no further activity occurs. Thank you for your contribution!

stale[bot] avatar Dec 20 '24 03:12 stale[bot]

This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen it (or open a new one) if the proposed change is still appropriate. Thank you for your contribution!

stale[bot] avatar Jan 19 '25 05:01 stale[bot]