Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.

fix(nuxt): fallback to static error page on server error#6697

Merged
pi0 merged 7 commits intomainfrom
feat/static-error-page
Aug 17, 2022
Merged

fix(nuxt): fallback to static error page on server error#6697
pi0 merged 7 commits intomainfrom
feat/static-error-page

Conversation

@antfu
Copy link
Copy Markdown
Member

@antfu antfu commented Aug 17, 2022

🔗 Linked issue

Part of #6683

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

When there is a server error, the /__nuxt_error might also fail to render, we fallback to use static HTML render in this case.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@netlify
Copy link
Copy Markdown

netlify Bot commented Aug 17, 2022

Deploy Preview for nuxt3-docs canceled.

Name Link
🔨 Latest commit 4147ee6
🔍 Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/62fcb0f583bbdb0008307b07

Comment thread packages/nuxt/src/core/runtime/nitro/error.ts Outdated
@pi0
Copy link
Copy Markdown
Member

pi0 commented Aug 17, 2022

Trying locally, the production build errors makes an infinity loop. Investigating...

image

import { withQuery } from 'ufo'
import type { NitroErrorHandler } from 'nitropack'
import type { H3Error } from 'h3'
import { importModule } from '@nuxt/kit'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danielroe Do you have any idea why this wasn't caught by import protection?

@pi0 pi0 force-pushed the feat/static-error-page branch from 5638bfc to 4147ee6 Compare August 17, 2022 09:12
@pi0 pi0 merged commit 69c281f into main Aug 17, 2022
@pi0 pi0 deleted the feat/static-error-page branch August 17, 2022 09:14
@pi0 pi0 mentioned this pull request Aug 26, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants