-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Truncated error response when using reply.code(undefined) #2078
Labels
good first issue
Good for newcomers
Comments
I think the problem is that Would that work? |
@feugy can you also open an issue on fastify-gql? It should not pass an |
feugy
added a commit
to feugy/fastify-gql
that referenced
this issue
Feb 4, 2020
Only set error response status code when it is defined. Otherwise response will be truncated. See fastify/fastify#2078
mcollina
pushed a commit
to mercurius-js/mercurius
that referenced
this issue
Feb 4, 2020
* fix: error handler setting undefined status code Only set error response status code when it is defined. Otherwise response will be truncated. See fastify/fastify#2078 * chore: add tests
4 tasks
leorossi
added a commit
to leorossi/fastify
that referenced
this issue
Feb 13, 2020
mcollina
pushed a commit
that referenced
this issue
Feb 13, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
馃悰 Bug Report
When setting the response status code to
undefined
inside error handler, response returned is truncated.This bug was unveiled while working on an issue with
fastifh-gql
default error handler, which set the response code toerr.statusCode
, that could be undefined.To Reproduce
Codesandbox
Paste your code here:
You'll get in return:
On a browser such as Firefox or Chrome, the response is truncated.
Expected behavior
The response should not be truncated.
Your Environment
The text was updated successfully, but these errors were encountered: