router
router copied to clipboard
docs: Define HTTP status codes
We should document these HTTP status codes somewhere, but for now, an issued is better than nothing!
Current Understanding
- 400 Bad Request: could be a graphql validation issue, or any issue when parsing the http request
- 401 Unauthorized: returned by the authorization plugin to clients or returned by the subscription endpoint when trying to send an event to a non-existent subscription or when having an invalid hash
- 405 Method Not Allowed: returned when a
mutationcomes in with an HTTP method other thanPOSTor when not usingPOSTon the subscription endpoint - 406 Not Acceptable: when a query comes in with an
Acceptheader the router does not support (e.g., different fromapplication/json,application/graphql-response+json,multipart/mixed;deferSpec=20220824ormultipart/mixed;subscriptionSpec=1.0. - 500 Internal Server Error: This could be a status code set explicitly by plugins, but it's best to check the logs. It could also be a bug. In the event of a suspected bug, please open an issue on the
routerrepository with a reproduction!