We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
3.25.0
7.0.0
16.13.0
macOS
11.6.1
The plugin uses app.render under the hood, which explicitly disallows rendering _app, _document and _error pages:
app.render
_app
_document
_error
https://github.com/vercel/next.js/blob/e75361fd03872b097e817634c049b3185f24cf56/packages/next/server/base-server.ts#L1704
Attempting to render the _error path (as described in the readme) results in a 404 Not Found response.
If you need to render with Next.js from within a custom handler (such as an error handler), use reply.nextRender app.setErrorHandler((err, req, reply) => { reply.status(err.statusCode || 500) return reply.nextRender('/_error') })
If you need to render with Next.js from within a custom handler (such as an error handler), use reply.nextRender
reply.nextRender
app.setErrorHandler((err, req, reply) => { reply.status(err.statusCode || 500) return reply.nextRender('/_error') })
See description.
The plugin should either:
app
app.renderError
reply.nextRenderError
The text was updated successfully, but these errors were encountered:
Would you like to send a Pull Request to address this issue? Remember to add unit tests.
I'd go with both 1 and 2.
Sorry, something went wrong.
Cheers - I think option 2 makes most sense specifically for this problem. Option 1 is a more general feature suggestion.
👉🏻 #436
Successfully merging a pull request may close this issue.
Prerequisites
Fastify version
3.25.0
Plugin version
7.0.0
Node.js version
16.13.0
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
11.6.1
Description
The plugin uses
app.render
under the hood, which explicitly disallows rendering_app
,_document
and_error
pages:https://github.com/vercel/next.js/blob/e75361fd03872b097e817634c049b3185f24cf56/packages/next/server/base-server.ts#L1704
Attempting to render the
_error
path (as described in the readme) results in a 404 Not Found response.Steps to Reproduce
See description.
Expected Behavior
The plugin should either:
app
instance, so thatapp.renderError
can be called manuallyreply.nextRenderError
which proxies theapp.renderError
similar to howreply.nextRender
worksThe text was updated successfully, but these errors were encountered: