You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/path-to-project/node_modules/.pnpm/[email protected]/node_modules/fastify/lib/reply.js:642
throw new FST_ERR_REP_INVALID_PAYLOAD_TYPE(typeof payload)
^
FastifyError [Error]: Attempted to send payload of invalid type 'object'. Expected a string or Buffer.
at onSendEnd (/path-to-project/node_modules/.pnpm/[email protected]/node_modules/fastify/lib/reply.js:642:11)
at wrapOnSendEnd (/path-to-project/node_modules/.pnpm/[email protected]/node_modules/fastify/lib/reply.js:536:5)
at next (/path-to-project/node_modules/.pnpm/[email protected]/node_modules/fastify/lib/hooks.js:289:7)
at handleResolve (/path-to-project/node_modules/.pnpm/[email protected]/node_modules/fastify/lib/hooks.js:306:5)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'FST_ERR_REP_INVALID_PAYLOAD_TYPE',
statusCode: 500
}
Node.js v20.16.0
[nodemon] app crashed - waiting for file changes before starting...
Environment
node version: 20
fastify version: >=v5.0.0-alpha.4
os: Mac, Linux
The text was updated successfully, but these errors were encountered:
The stacktrace above was created with the latest version v5.1.0 (/path-to-project/node_modules/.pnpm/[email protected]/node_modules/fastify/lib/reply.js:642)
Please provide a minimal reproducible example, written in JavaScript. Doing so will help us diagnose your issue. It should be the bare minimum code needed to trigger the issue, and easily runnable without any changes or extra code.
You may use a GitHub repository to host the code if it is too much to fit in a code block (or two).
Thank you. I will need some time to compile a reproducible setup. The error is occuring during a rather complex single-sign-on process which is involving different dependencies (e.g., grant, @fastify/http-proxy).
Hope to get it done before Christmas, but can't say for sure.
💬 Change introduced in v5.0.0-alpha.4 is crashing my application
In
fastify/lib/reply.js
this part was removed:Instead of the above, the process is running into
I failed to find documentation regarding this breaking change in the migration documentations. Maybe I am missing something?
https://fastify.dev/docs/v5.0.x/Guides/Migration-Guide-V5/
https://fastify.dev/docs/v5.1.x/Guides/Migration-Guide-V5/
Environment
The text was updated successfully, but these errors were encountered: