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
node:events:497
throw er; // Unhandled 'error' event
^
FastifyError [Error]: Called reply with an invalid status code: 888
at Reply.code (/fastify-reply-error/node_modules/fastify/lib/reply.js:338:11)
at /fastify-reply-error/node_modules/@fastify/reply-from/index.js:201:12
at /fastify-reply-error/node_modules/@fastify/reply-from/index.js:284:9
at /fastify-reply-error/node_modules/@fastify/reply-from/lib/request.js:177:7
at RequestHandler.runInAsyncScope (node:async_hooks:206:9)
at RequestHandler.onHeaders (/fastify-reply-error/node_modules/undici/lib/api/api-request.js:104:14)
at Request.onHeaders (/fastify-reply-error/node_modules/undici/lib/core/request.js:275:29)
at Parser.onHeadersComplete (/fastify-reply-error/node_modules/undici/lib/client.js:920:27)
at wasm_on_headers_complete (/fastify-reply-error/node_modules/undici/lib/client.js:536:30)
at wasm://wasm/0003626a:wasm-function[11]:0x494
Emitted 'error' event on BodyReadable instance at:
at BodyReadable.emit (/fastify-reply-error/node_modules/undici/lib/api/readable.js:73:18)
at emitErrorNT (node:internal/streams/destroy:169:8)
at emitErrorCloseNT (node:internal/streams/destroy:128:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: 'FST_ERR_BAD_STATUS_CODE',
statusCode: 500
}
Link to code that reproduces the bug
No response
Expected Behavior
The app should not crash.
The text was updated successfully, but these errors were encountered:
Prerequisites
Fastify version
4.28.1
Plugin version
9.8.0
Node.js version
20.13.1
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
12.7.5
Description
When the upstream server returns an invalid status code (ex.
888
), fastify server will crash.steps to reproduce:
npm i express fastify @fastify/reply-from
index.js
file with the following codenode index.js
http://localhost:3000/
Link to code that reproduces the bug
No response
Expected Behavior
The app should not crash.
The text was updated successfully, but these errors were encountered: