177 | response._lightMyRequest.headers = Object.assign({}, response.getHeaders())
178 |
179 | // Add raw headers
180 | ;['Date', 'Connection', 'Transfer-Encoding'].forEach((name) => {
181 | const regex = new RegExp('\\r\\n' + name + ': ([^\\r]*)\\r\\n')
182 | const field = response._header.match(regex)
^
TypeError: undefined is not an object (evaluating 'response._header.match')
at /code/fastify-inject/node_modules/light-my-request/lib/response.js:182:19
at forEach (:1:21)
at copyHeaders (/code/fastify-inject/node_modules/light-my-request/lib/response.js:180:4)
at /code/fastify-inject/node_modules/light-my-request/lib/response.js:65:3
at /code/fastify-inject/node_modules/fastify/lib/error-handler.js:42:9
at fallbackErrorHandler (/code/fastify-inject/node_modules/fastify/lib/error-handler.js:127:3)
at handleError (/code/fastify-inject/node_modules/fastify/lib/error-handler.js:34:5)
at onErrorHook (/code/fastify-inject/node_modules/fastify/lib/reply.js:839:5)
at /code/fastify-inject/node_modules/fastify/lib/reply.js:157:5
at preValidationCallback (/code/fastify-inject/node_modules/fastify/lib/handleRequest.js:87:5)
Bun v1.1.7 (Linux x64)
Additional information
I'm using this API in production, but I can't test it without get a server up. In node.js it just works.
What version of Bun is running?
1.1.7+b0b7db5c0
What platform is your computer?
Linux 6.6.30-1-MANJARO x86_64 unknown
What steps can reproduce the bug?
Create a new
.js
file, installfastify
and run it:What is the expected behavior?
You should see the string
"Hello World!"
What do you see instead?
This error:
Additional information
I'm using this API in production, but I can't test it without get a server up. In node.js it just works.