-
Notifications
You must be signed in to change notification settings - Fork 995
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(server): don't mix async and callback styles (#9931)
Running `yarn rw serve` in the v7 RC emits two warnings: ``` $ yarn rw serve ... (node:69556) [FSTWRN002] FastifyWarning: The redwoodFastifyWeb plugin being registered mixes async and callback styles, which will result in an error in `fastify@5` (Use `node --trace-warnings ...` to show where the warning was created) (node:69556) [FSTWRN002] FastifyWarning: The redwoodFastifyAPI plugin being registered mixes async and callback styles, which will result in an error in `fastify@5` ``` These seem to be because the fastify plugins are async but use the `done` param, which is the callback style. This PR removes the callback style in favor of the async. I'm also removing this warn log which we've already handled on the frontend by registering a warning route for. Right now there's no correct configuration for it when both plugins are registered on the same instance, which is what we've been doing since forever, and I don't want logs to become meaningless: ``` {"level":40,"time":1706557821043,"pid":69556,"hostname":"evaM1.local","msg":"apiUrl is relative but there's no proxy target"} ```
- Loading branch information
Showing
4 changed files
with
6 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters