Skip to content
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

FastifyError: Promise may not be fulfilled with 'undefined' when statusCode is not 204 #223

Open
softshipper opened this issue Dec 17, 2021 · 1 comment

Comments

@softshipper
Copy link

softshipper commented Dec 17, 2021

Hi all,

The server logs show the following message after request:

"level":30,"time":1639778259855,"pid":57154,"hostname":"digiwave","reqId":"req-2","res":{"statusCode":200},"responseTime":1.9270270019769669,"msg":"request completed"}
{"level":30,"time":1639778260754,"pid":57154,"hostname":"digiwave","reqId":"req-3","req":{"method":"POST","url":"/graphql","hostname":"localhost:8080","remoteAddress":"127.0.0.1","remotePort":45644},"msg":"incoming request"}
{"level":50,"time":1639778260755,"pid":57154,"hostname":"digiwave","reqId":"req-3","err":{"type":"FastifyError","message":"Promise may not be fulfilled with 'undefined' when statusCode is not 204","stack":"FastifyError: Promise may not be fulfilled with 'undefined' when statusCode is not 204\n    at /home/developer/node/gql-gateway-svc/node_modules/fastify/lib/wrapThenable.js:30:30\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)","name":"FastifyError","code":"FST_ERR_PROMISE_NOT_FULFILLED","statusCode":500},"msg":"Promise may not be fulfilled with 'undefined' when statusCode is not 204"}

The code can be downloaded here:
gql-gateway-svc.zip

Run the project with command:

npm run gql:gateway:dev

and open in the browser http://localhost:8080/graphql.

What am I doing wrong?

Thanks

@karakotineeraj
Copy link

@softshipper @mosch @dan-lee @maraisr @erictaylor
HI, I am having the same problem and would like to know why this error is being thrown.
Thanks in advance

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

No branches or pull requests

2 participants