0

我正在使用 Fastify 2.12.1 并且我不断收到这个 FastifyError FST_ERR_REP_INVALID_PAYLOAD_TYPE 有人可以帮我调试这个问题。

Caught exception: FastifyError [FST_ERR_REP_INVALID_PAYLOAD_TYPE]: FST_ERR_REP_INVALID_PAYLOAD_TYPE: Attempted to send payload of invalid type 'object'. Expected a string or Buffer.
at onSendEnd (/usr/app/node_modules/fastify/lib/reply.js:361:11)
at wrapOnSendEnd (/usr/app/node_modules/fastify/lib/reply.js:331:5)
at next (/usr/app/node_modules/fastify/lib/hooks.js:103:7)
at Object.<anonymous> (/usr/app/build/server.js:3:2695689)
at next (/usr/app/node_modules/fastify/lib/hooks.js:107:34)
at onSendHookRunner (/usr/app/node_modules/fastify/lib/hooks.js:121:3)
at onSendHook (/usr/app/node_modules/fastify/lib/reply.js:315:5)
at _Reply.Reply.send (/usr/app/node_modules/fastify/lib/reply.js:150:3)
at Object.basic404 [as handler] (/usr/app/node_modules/fastify/lib/fourOhFour.js:49:21)
at notFound (/usr/app/node_modules/fastify/lib/reply.js:571:17)
at _Reply.Reply.callNotFound (/usr/app/node_modules/fastify/lib/reply.js:244:3)
at SendStream.<anonymous> (/usr/app/node_modules/fastify-static/index.js:98:24)
at SendStream.emit (events.js:223:5) at SendStream.EventEmitter.emit (domain.js:475:20) at SendStream.error (/usr/app/node_modules/fastify-static/node_modules/send/index.js:270:17)
at SendStream.onStatError (/usr/app/node_modules/fastify-static/node_modules/send/index.js:421:12)
{ name: 'FastifyError [FST_ERR_REP_INVALID_PAYLOAD_TYPE]', code: 'FST_ERR_REP_INVALID_PAYLOAD_TYPE', message: "FST_ERR_REP_INVALID_PAYLOAD_TYPE: Attempted to send payload of invalid type 'object'. Expected a string or Buffer.", statusCode: 500 }
4

0 回答 0