-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
fix: enhance 100 and 200 or 204 handling #5056
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
So potential performance hit, because some people apply a preSerializiation hook on 204? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening a PR! Can you please add a unit test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are there unnecessary white space changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
why did the |
It seems the last test is failing, can you try to replicate it in local? Line 24 in 5a98e7e
|
Node: 16 Node: 18 Node: 20 |
so getting a error for this, when trying to send data in 204 status. {
"statusCode": 500,
"code": "FST_ERR_REP_INVALID_PAYLOAD_TYPE",
"error": "Internal Server Error",
"message": "Attempted to send payload of invalid type 'object'. Expected a string or Buffer."
} the correct code should be this right? fastify.delete('/delete/:id', async function (request, reply) {
const { id } = request.params
reply.code(204).send()
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so getting a error for this, when trying to send data in 204 status.
{ "statusCode": 500, "code": "FST_ERR_REP_INVALID_PAYLOAD_TYPE", "error": "Internal Server Error", "message": "Attempted to send payload of invalid type 'object'. Expected a string or Buffer." }the correct code should be this right?
fastify.delete('/delete/:id', async function (request, reply) { const { id } = request.params reply.code(204).send() })
Good catch!
Yes, exactly. It seems we didn't notice it before, but with your change, as on 204
we now bypass the serialization step, it goes straight away into preparing the payload to be dispatched and noticed is not a string nor a Buffer, throwing that error.
Can you also add a test
Maybe you'd like to inline it with the payload === undefined
check as both scopes are the same. See
Can anyone help me with this why this gives error, says |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, a bit late for the comment.
But override the payload inside reply.send
shouldn't be the right option.
Instead, the guard should be at the last stage before sending to res.write
.
The reason is that,
- User lost the original
payload
insideonSend
hook .send
is not the final state for user to change thestatus code
.
Good catch, let's do that 👍 Line 616 in 14a9ccc
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [fastify](https://www.fastify.dev/) ([source](https://togithub.com/fastify/fastify)) | [`4.23.2` -> `4.24.0`](https://renovatebot.com/diffs/npm/fastify/4.23.2/4.24.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>fastify/fastify (fastify)</summary> ### [`v4.24.0`](https://togithub.com/fastify/fastify/releases/tag/v4.24.0) [Compare Source](https://togithub.com/fastify/fastify/compare/v4.23.2...v4.24.0) #### What's Changed - docs: Add blank line before onclose hook heading by [@​kadoshita](https://togithub.com/kadoshita) in [https://github.com/fastify/fastify/pull/5042](https://togithub.com/fastify/fastify/pull/5042) - build(dependabot): ignore tap major updates by [@​Fdawgs](https://togithub.com/Fdawgs) in [https://github.com/fastify/fastify/pull/5047](https://togithub.com/fastify/fastify/pull/5047) - chore: Bump actions/checkout from 3 to 4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/fastify/fastify/pull/5048](https://togithub.com/fastify/fastify/pull/5048) - chore: more perf by [@​Eomm](https://togithub.com/Eomm) in [https://github.com/fastify/fastify/pull/5016](https://togithub.com/fastify/fastify/pull/5016) - docs(ecosystem): add fastify-prisma by [@​zrosenbauer](https://togithub.com/zrosenbauer) in [https://github.com/fastify/fastify/pull/5041](https://togithub.com/fastify/fastify/pull/5041) - test: fix ci due yup breaking by [@​Eomm](https://togithub.com/Eomm) in [https://github.com/fastify/fastify/pull/5058](https://togithub.com/fastify/fastify/pull/5058) - perf: optimize split params by [@​Connormiha](https://togithub.com/Connormiha) in [https://github.com/fastify/fastify/pull/5057](https://togithub.com/fastify/fastify/pull/5057) - chore: implicitly infer SchemaCompiler as readonly by [@​DemonHa](https://togithub.com/DemonHa) in [https://github.com/fastify/fastify/pull/5060](https://togithub.com/fastify/fastify/pull/5060) - test(logger): splitting existing tests to avoid pipeline failing for timeout by [@​giuliowaitforitdavide](https://togithub.com/giuliowaitforitdavide) in [https://github.com/fastify/fastify/pull/5064](https://togithub.com/fastify/fastify/pull/5064) - fix(async-hooks): mixing async and callback style in preHandler option now returns an error by [@​giuliowaitforitdavide](https://togithub.com/giuliowaitforitdavide) in [https://github.com/fastify/fastify/pull/5069](https://togithub.com/fastify/fastify/pull/5069) - fix: enhance 100 and 200 or 204 handling by [@​Iamshankhadeep](https://togithub.com/Iamshankhadeep) in [https://github.com/fastify/fastify/pull/5056](https://togithub.com/fastify/fastify/pull/5056) - docs: add fastify-cloudflare-turnstile to ecosystem by [@​112RG](https://togithub.com/112RG) in [https://github.com/fastify/fastify/pull/5067](https://togithub.com/fastify/fastify/pull/5067) - docs: Fixing a couple typos by [@​Cadienvan](https://togithub.com/Cadienvan) in [https://github.com/fastify/fastify/pull/5079](https://togithub.com/fastify/fastify/pull/5079) - feat: Add `Symbol.asyncDispose` to improve DX in short lived servers. by [@​arthurfiorette](https://togithub.com/arthurfiorette) in [https://github.com/fastify/fastify/pull/5082](https://togithub.com/fastify/fastify/pull/5082) - docs: Documentation changes requested at [#​5082](https://togithub.com/fastify/fastify/issues/5082) by [@​arthurfiorette](https://togithub.com/arthurfiorette) in [https://github.com/fastify/fastify/pull/5083](https://togithub.com/fastify/fastify/pull/5083) - docs: remove thenable promisesaplus spec references by [@​dancastillo](https://togithub.com/dancastillo) in [https://github.com/fastify/fastify/pull/5081](https://togithub.com/fastify/fastify/pull/5081) - docs(ecosystem): add fastify-event-bus by [@​Shiva127](https://togithub.com/Shiva127) in [https://github.com/fastify/fastify/pull/5085](https://togithub.com/fastify/fastify/pull/5085) - docs: update docs for FastifyPlugin by [@​dancastillo](https://togithub.com/dancastillo) in [https://github.com/fastify/fastify/pull/5070](https://togithub.com/fastify/fastify/pull/5070) - docs: Update for .hijack heading by [@​jackbatzner](https://togithub.com/jackbatzner) in [https://github.com/fastify/fastify/pull/5088](https://togithub.com/fastify/fastify/pull/5088) - fix(warnings): fixed warning when accessing context property from Request and Reply objects by [@​giuliowaitforitdavide](https://togithub.com/giuliowaitforitdavide) in [https://github.com/fastify/fastify/pull/5084](https://togithub.com/fastify/fastify/pull/5084) - fix: HEAD route search by [@​ivan-tymoshenko](https://togithub.com/ivan-tymoshenko) in [https://github.com/fastify/fastify/pull/5078](https://togithub.com/fastify/fastify/pull/5078) #### New Contributors - [@​kadoshita](https://togithub.com/kadoshita) made their first contribution in [https://github.com/fastify/fastify/pull/5042](https://togithub.com/fastify/fastify/pull/5042) - [@​Connormiha](https://togithub.com/Connormiha) made their first contribution in [https://github.com/fastify/fastify/pull/5057](https://togithub.com/fastify/fastify/pull/5057) - [@​DemonHa](https://togithub.com/DemonHa) made their first contribution in [https://github.com/fastify/fastify/pull/5060](https://togithub.com/fastify/fastify/pull/5060) - [@​Iamshankhadeep](https://togithub.com/Iamshankhadeep) made their first contribution in [https://github.com/fastify/fastify/pull/5056](https://togithub.com/fastify/fastify/pull/5056) - [@​Cadienvan](https://togithub.com/Cadienvan) made their first contribution in [https://github.com/fastify/fastify/pull/5079](https://togithub.com/fastify/fastify/pull/5079) - [@​arthurfiorette](https://togithub.com/arthurfiorette) made their first contribution in [https://github.com/fastify/fastify/pull/5082](https://togithub.com/fastify/fastify/pull/5082) - [@​jackbatzner](https://togithub.com/jackbatzner) made their first contribution in [https://github.com/fastify/fastify/pull/5088](https://togithub.com/fastify/fastify/pull/5088) **Full Changelog**: fastify/fastify@v4.23.2...v4.24.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/tomacheese/telcheck). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44LjEiLCJ1cGRhdGVkSW5WZXIiOiIzNy44LjEiLCJ0YXJnZXRCcmFuY2giOiJtYXN0ZXIifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [fastify](https://www.fastify.dev/) ([source](https://togithub.com/fastify/fastify)) | [`4.23.2` -> `4.24.3`](https://renovatebot.com/diffs/npm/fastify/4.23.2/4.24.3) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>fastify/fastify (fastify)</summary> ### [`v4.24.3`](https://togithub.com/fastify/fastify/releases/tag/v4.24.3) [Compare Source](https://togithub.com/fastify/fastify/compare/v4.24.2...v4.24.3) #### What's Changed - fix: timeout on citgm tests by [@​simone-sanfratello](https://togithub.com/simone-sanfratello) in [https://github.com/fastify/fastify/pull/5101](https://togithub.com/fastify/fastify/pull/5101) - chore: add missing `use strict` directives by [@​Fdawgs](https://togithub.com/Fdawgs) in [https://github.com/fastify/fastify/pull/5106](https://togithub.com/fastify/fastify/pull/5106) **Full Changelog**: fastify/fastify@v4.24.2...v4.24.3 ### [`v4.24.2`](https://togithub.com/fastify/fastify/releases/tag/v4.24.2) [Compare Source](https://togithub.com/fastify/fastify/compare/v4.24.1...v4.24.2) #### What's Changed - fix: build problems when `Symbol.asyncDispose` type is not available. by [@​arthurfiorette](https://togithub.com/arthurfiorette) in [https://github.com/fastify/fastify/pull/5096](https://togithub.com/fastify/fastify/pull/5096) **Full Changelog**: fastify/fastify@v4.24.1...v4.24.2 ### [`v4.24.1`](https://togithub.com/fastify/fastify/releases/tag/v4.24.1) [Compare Source](https://togithub.com/fastify/fastify/compare/v4.24.0...v4.24.1) #### What's Changed - fix: citgm by [@​simone-sanfratello](https://togithub.com/simone-sanfratello) in [https://github.com/fastify/fastify/pull/5075](https://togithub.com/fastify/fastify/pull/5075) - fix: HEAD route reseting by [@​ivan-tymoshenko](https://togithub.com/ivan-tymoshenko) in [https://github.com/fastify/fastify/pull/5090](https://togithub.com/fastify/fastify/pull/5090) **Full Changelog**: fastify/fastify@v4.24.0...v4.24.1 ### [`v4.24.0`](https://togithub.com/fastify/fastify/releases/tag/v4.24.0) [Compare Source](https://togithub.com/fastify/fastify/compare/v4.23.2...v4.24.0) #### What's Changed - docs: Add blank line before onclose hook heading by [@​kadoshita](https://togithub.com/kadoshita) in [https://github.com/fastify/fastify/pull/5042](https://togithub.com/fastify/fastify/pull/5042) - build(dependabot): ignore tap major updates by [@​Fdawgs](https://togithub.com/Fdawgs) in [https://github.com/fastify/fastify/pull/5047](https://togithub.com/fastify/fastify/pull/5047) - chore: Bump actions/checkout from 3 to 4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/fastify/fastify/pull/5048](https://togithub.com/fastify/fastify/pull/5048) - chore: more perf by [@​Eomm](https://togithub.com/Eomm) in [https://github.com/fastify/fastify/pull/5016](https://togithub.com/fastify/fastify/pull/5016) - docs(ecosystem): add fastify-prisma by [@​zrosenbauer](https://togithub.com/zrosenbauer) in [https://github.com/fastify/fastify/pull/5041](https://togithub.com/fastify/fastify/pull/5041) - test: fix ci due yup breaking by [@​Eomm](https://togithub.com/Eomm) in [https://github.com/fastify/fastify/pull/5058](https://togithub.com/fastify/fastify/pull/5058) - perf: optimize split params by [@​Connormiha](https://togithub.com/Connormiha) in [https://github.com/fastify/fastify/pull/5057](https://togithub.com/fastify/fastify/pull/5057) - chore: implicitly infer SchemaCompiler as readonly by [@​DemonHa](https://togithub.com/DemonHa) in [https://github.com/fastify/fastify/pull/5060](https://togithub.com/fastify/fastify/pull/5060) - test(logger): splitting existing tests to avoid pipeline failing for timeout by [@​giuliowaitforitdavide](https://togithub.com/giuliowaitforitdavide) in [https://github.com/fastify/fastify/pull/5064](https://togithub.com/fastify/fastify/pull/5064) - fix(async-hooks): mixing async and callback style in preHandler option now returns an error by [@​giuliowaitforitdavide](https://togithub.com/giuliowaitforitdavide) in [https://github.com/fastify/fastify/pull/5069](https://togithub.com/fastify/fastify/pull/5069) - fix: enhance 100 and 200 or 204 handling by [@​Iamshankhadeep](https://togithub.com/Iamshankhadeep) in [https://github.com/fastify/fastify/pull/5056](https://togithub.com/fastify/fastify/pull/5056) - docs: add fastify-cloudflare-turnstile to ecosystem by [@​112RG](https://togithub.com/112RG) in [https://github.com/fastify/fastify/pull/5067](https://togithub.com/fastify/fastify/pull/5067) - docs: Fixing a couple typos by [@​Cadienvan](https://togithub.com/Cadienvan) in [https://github.com/fastify/fastify/pull/5079](https://togithub.com/fastify/fastify/pull/5079) - feat: Add `Symbol.asyncDispose` to improve DX in short lived servers. by [@​arthurfiorette](https://togithub.com/arthurfiorette) in [https://github.com/fastify/fastify/pull/5082](https://togithub.com/fastify/fastify/pull/5082) - docs: Documentation changes requested at [#​5082](https://togithub.com/fastify/fastify/issues/5082) by [@​arthurfiorette](https://togithub.com/arthurfiorette) in [https://github.com/fastify/fastify/pull/5083](https://togithub.com/fastify/fastify/pull/5083) - docs: remove thenable promisesaplus spec references by [@​dancastillo](https://togithub.com/dancastillo) in [https://github.com/fastify/fastify/pull/5081](https://togithub.com/fastify/fastify/pull/5081) - docs(ecosystem): add fastify-event-bus by [@​Shiva127](https://togithub.com/Shiva127) in [https://github.com/fastify/fastify/pull/5085](https://togithub.com/fastify/fastify/pull/5085) - docs: update docs for FastifyPlugin by [@​dancastillo](https://togithub.com/dancastillo) in [https://github.com/fastify/fastify/pull/5070](https://togithub.com/fastify/fastify/pull/5070) - docs: Update for .hijack heading by [@​jackbatzner](https://togithub.com/jackbatzner) in [https://github.com/fastify/fastify/pull/5088](https://togithub.com/fastify/fastify/pull/5088) - fix(warnings): fixed warning when accessing context property from Request and Reply objects by [@​giuliowaitforitdavide](https://togithub.com/giuliowaitforitdavide) in [https://github.com/fastify/fastify/pull/5084](https://togithub.com/fastify/fastify/pull/5084) - fix: HEAD route search by [@​ivan-tymoshenko](https://togithub.com/ivan-tymoshenko) in [https://github.com/fastify/fastify/pull/5078](https://togithub.com/fastify/fastify/pull/5078) #### New Contributors - [@​kadoshita](https://togithub.com/kadoshita) made their first contribution in [https://github.com/fastify/fastify/pull/5042](https://togithub.com/fastify/fastify/pull/5042) - [@​Connormiha](https://togithub.com/Connormiha) made their first contribution in [https://github.com/fastify/fastify/pull/5057](https://togithub.com/fastify/fastify/pull/5057) - [@​DemonHa](https://togithub.com/DemonHa) made their first contribution in [https://github.com/fastify/fastify/pull/5060](https://togithub.com/fastify/fastify/pull/5060) - [@​Iamshankhadeep](https://togithub.com/Iamshankhadeep) made their first contribution in [https://github.com/fastify/fastify/pull/5056](https://togithub.com/fastify/fastify/pull/5056) - [@​Cadienvan](https://togithub.com/Cadienvan) made their first contribution in [https://github.com/fastify/fastify/pull/5079](https://togithub.com/fastify/fastify/pull/5079) - [@​arthurfiorette](https://togithub.com/arthurfiorette) made their first contribution in [https://github.com/fastify/fastify/pull/5082](https://togithub.com/fastify/fastify/pull/5082) - [@​jackbatzner](https://togithub.com/jackbatzner) made their first contribution in [https://github.com/fastify/fastify/pull/5088](https://togithub.com/fastify/fastify/pull/5088) **Full Changelog**: fastify/fastify@v4.23.2...v4.24.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/redwoodjs/redwood). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40Ni4wIiwidXBkYXRlZEluVmVyIjoiMzcuNDYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [fastify](https://www.fastify.dev/) ([source](https://togithub.com/fastify/fastify)) | [`4.23.2` -> `4.24.3`](https://renovatebot.com/diffs/npm/fastify/4.23.2/4.24.3) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- <details> <summary>fastify/fastify (fastify)</summary> [`v4.24.3`](https://togithub.com/fastify/fastify/releases/tag/v4.24.3) [Compare Source](https://togithub.com/fastify/fastify/compare/v4.24.2...v4.24.3) - fix: timeout on citgm tests by [@​simone-sanfratello](https://togithub.com/simone-sanfratello) in [https://github.com/fastify/fastify/pull/5101](https://togithub.com/fastify/fastify/pull/5101) - chore: add missing `use strict` directives by [@​Fdawgs](https://togithub.com/Fdawgs) in [https://github.com/fastify/fastify/pull/5106](https://togithub.com/fastify/fastify/pull/5106) **Full Changelog**: fastify/fastify@v4.24.2...v4.24.3 [`v4.24.2`](https://togithub.com/fastify/fastify/releases/tag/v4.24.2) [Compare Source](https://togithub.com/fastify/fastify/compare/v4.24.1...v4.24.2) - fix: build problems when `Symbol.asyncDispose` type is not available. by [@​arthurfiorette](https://togithub.com/arthurfiorette) in [https://github.com/fastify/fastify/pull/5096](https://togithub.com/fastify/fastify/pull/5096) **Full Changelog**: fastify/fastify@v4.24.1...v4.24.2 [`v4.24.1`](https://togithub.com/fastify/fastify/releases/tag/v4.24.1) [Compare Source](https://togithub.com/fastify/fastify/compare/v4.24.0...v4.24.1) - fix: citgm by [@​simone-sanfratello](https://togithub.com/simone-sanfratello) in [https://github.com/fastify/fastify/pull/5075](https://togithub.com/fastify/fastify/pull/5075) - fix: HEAD route reseting by [@​ivan-tymoshenko](https://togithub.com/ivan-tymoshenko) in [https://github.com/fastify/fastify/pull/5090](https://togithub.com/fastify/fastify/pull/5090) **Full Changelog**: fastify/fastify@v4.24.0...v4.24.1 [`v4.24.0`](https://togithub.com/fastify/fastify/releases/tag/v4.24.0) [Compare Source](https://togithub.com/fastify/fastify/compare/v4.23.2...v4.24.0) - docs: Add blank line before onclose hook heading by [@​kadoshita](https://togithub.com/kadoshita) in [https://github.com/fastify/fastify/pull/5042](https://togithub.com/fastify/fastify/pull/5042) - build(dependabot): ignore tap major updates by [@​Fdawgs](https://togithub.com/Fdawgs) in [https://github.com/fastify/fastify/pull/5047](https://togithub.com/fastify/fastify/pull/5047) - chore: Bump actions/checkout from 3 to 4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/fastify/fastify/pull/5048](https://togithub.com/fastify/fastify/pull/5048) - chore: more perf by [@​Eomm](https://togithub.com/Eomm) in [https://github.com/fastify/fastify/pull/5016](https://togithub.com/fastify/fastify/pull/5016) - docs(ecosystem): add fastify-prisma by [@​zrosenbauer](https://togithub.com/zrosenbauer) in [https://github.com/fastify/fastify/pull/5041](https://togithub.com/fastify/fastify/pull/5041) - test: fix ci due yup breaking by [@​Eomm](https://togithub.com/Eomm) in [https://github.com/fastify/fastify/pull/5058](https://togithub.com/fastify/fastify/pull/5058) - perf: optimize split params by [@​Connormiha](https://togithub.com/Connormiha) in [https://github.com/fastify/fastify/pull/5057](https://togithub.com/fastify/fastify/pull/5057) - chore: implicitly infer SchemaCompiler as readonly by [@​DemonHa](https://togithub.com/DemonHa) in [https://github.com/fastify/fastify/pull/5060](https://togithub.com/fastify/fastify/pull/5060) - test(logger): splitting existing tests to avoid pipeline failing for timeout by [@​giuliowaitforitdavide](https://togithub.com/giuliowaitforitdavide) in [https://github.com/fastify/fastify/pull/5064](https://togithub.com/fastify/fastify/pull/5064) - fix(async-hooks): mixing async and callback style in preHandler option now returns an error by [@​giuliowaitforitdavide](https://togithub.com/giuliowaitforitdavide) in [https://github.com/fastify/fastify/pull/5069](https://togithub.com/fastify/fastify/pull/5069) - fix: enhance 100 and 200 or 204 handling by [@​Iamshankhadeep](https://togithub.com/Iamshankhadeep) in [https://github.com/fastify/fastify/pull/5056](https://togithub.com/fastify/fastify/pull/5056) - docs: add fastify-cloudflare-turnstile to ecosystem by [@​112RG](https://togithub.com/112RG) in [https://github.com/fastify/fastify/pull/5067](https://togithub.com/fastify/fastify/pull/5067) - docs: Fixing a couple typos by [@​Cadienvan](https://togithub.com/Cadienvan) in [https://github.com/fastify/fastify/pull/5079](https://togithub.com/fastify/fastify/pull/5079) - feat: Add `Symbol.asyncDispose` to improve DX in short lived servers. by [@​arthurfiorette](https://togithub.com/arthurfiorette) in [https://github.com/fastify/fastify/pull/5082](https://togithub.com/fastify/fastify/pull/5082) - docs: Documentation changes requested at [#​5082](https://togithub.com/fastify/fastify/issues/5082) by [@​arthurfiorette](https://togithub.com/arthurfiorette) in [https://github.com/fastify/fastify/pull/5083](https://togithub.com/fastify/fastify/pull/5083) - docs: remove thenable promisesaplus spec references by [@​dancastillo](https://togithub.com/dancastillo) in [https://github.com/fastify/fastify/pull/5081](https://togithub.com/fastify/fastify/pull/5081) - docs(ecosystem): add fastify-event-bus by [@​Shiva127](https://togithub.com/Shiva127) in [https://github.com/fastify/fastify/pull/5085](https://togithub.com/fastify/fastify/pull/5085) - docs: update docs for FastifyPlugin by [@​dancastillo](https://togithub.com/dancastillo) in [https://github.com/fastify/fastify/pull/5070](https://togithub.com/fastify/fastify/pull/5070) - docs: Update for .hijack heading by [@​jackbatzner](https://togithub.com/jackbatzner) in [https://github.com/fastify/fastify/pull/5088](https://togithub.com/fastify/fastify/pull/5088) - fix(warnings): fixed warning when accessing context property from Request and Reply objects by [@​giuliowaitforitdavide](https://togithub.com/giuliowaitforitdavide) in [https://github.com/fastify/fastify/pull/5084](https://togithub.com/fastify/fastify/pull/5084) - fix: HEAD route search by [@​ivan-tymoshenko](https://togithub.com/ivan-tymoshenko) in [https://github.com/fastify/fastify/pull/5078](https://togithub.com/fastify/fastify/pull/5078) - [@​kadoshita](https://togithub.com/kadoshita) made their first contribution in [https://github.com/fastify/fastify/pull/5042](https://togithub.com/fastify/fastify/pull/5042) - [@​Connormiha](https://togithub.com/Connormiha) made their first contribution in [https://github.com/fastify/fastify/pull/5057](https://togithub.com/fastify/fastify/pull/5057) - [@​DemonHa](https://togithub.com/DemonHa) made their first contribution in [https://github.com/fastify/fastify/pull/5060](https://togithub.com/fastify/fastify/pull/5060) - [@​Iamshankhadeep](https://togithub.com/Iamshankhadeep) made their first contribution in [https://github.com/fastify/fastify/pull/5056](https://togithub.com/fastify/fastify/pull/5056) - [@​Cadienvan](https://togithub.com/Cadienvan) made their first contribution in [https://github.com/fastify/fastify/pull/5079](https://togithub.com/fastify/fastify/pull/5079) - [@​arthurfiorette](https://togithub.com/arthurfiorette) made their first contribution in [https://github.com/fastify/fastify/pull/5082](https://togithub.com/fastify/fastify/pull/5082) - [@​jackbatzner](https://togithub.com/jackbatzner) made their first contribution in [https://github.com/fastify/fastify/pull/5088](https://togithub.com/fastify/fastify/pull/5088) **Full Changelog**: fastify/fastify@v4.23.2...v4.24.0 </details> --- 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/redwoodjs/redwood). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40Ni4wIiwidXBkYXRlZEluVmVyIjoiMzcuNDYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
I'm still trying to find the exact reason, but after this change, our logs are full width "response errored" entries. We are heavily using the proxy plugin and had no issues with it until this change. We have only one endpoint, that responds with 204 (PUT), and this is the only one started to (falsely) trigger the above warns. After reading all the comments belonging to this fix, I've double-checked our code (response and headers) but all seems fine on our part. I'm still doing my investigations, just wanted to share my perception. |
I have a reproduction code for my "response errored" issue above (reported in reply-from). The problem is with 204 responses (method independent) and when using node's http request (proxy options). |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
…zationHook`
fixes #5003
Checklist
npm run test
andnpm run benchmark
and the Code of conduct