We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa38785 commit 68347f8Copy full SHA for 68347f8
packages/next/src/server/route-modules/pages/pages-handler.ts
@@ -692,8 +692,15 @@ export const getHandler = ({
692
693
// when invoking _error before pages/500 we don't actually
694
// send the _error response - only skip if customErrorRender is set
695
- // (meaning pages/500 exists and will be rendered next)
696
- if (getRequestMeta(req, 'customErrorRender')) {
+ // (meaning pages/500 exists and will be rendered next), or if using
+ // the builtin _error in minimalMode to allow error bubbling
697
+ if (
698
+ getRequestMeta(req, 'customErrorRender') ||
699
+ (isErrorPage &&
700
+ isMinimalMode &&
701
+ res.statusCode === 500 &&
702
+ !isFallbackError)
703
+ ) {
704
return null
705
}
706
0 commit comments