contra/graphql-helix

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

softshipper opened this issue · 1 comments

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

@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