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

fix(nuxt): do not log 404 and showError as fatal by default#6437

Merged
pi0 merged 1 commit intomainfrom
fix/404-fatal
Aug 8, 2022
Merged

fix(nuxt): do not log 404 and showError as fatal by default#6437
pi0 merged 1 commit intomainfrom
fix/404-fatal

Conversation

@pi0
Copy link
Member

@pi0 pi0 commented Aug 8, 2022

🔗 Linked issue

❓ 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

With #4539 and h3js/h3#148 we introduced new fatal flag for error that are intended to be logged. 404 Page not found errors we throw are not fatal to be verbosely logged by h3.

Also with this change, showError by default does not set fatality of error but only mark there is an error and display it (locally testing works both when calling from client and server side).

Related: In future versions of h3, we might make createError smarter to infer fatal flag from known codes.

Appendix current output:

image

📝 Checklist

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

@netlify
Copy link

netlify bot commented Aug 8, 2022

Deploy Preview for nuxt3-docs canceled.

Name Link
🔨 Latest commit 334b86e
🔍 Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/62f0f724d11335000a06b53f

@pi0 pi0 requested a review from danielroe August 8, 2022 11:44
@pi0 pi0 merged commit 4ec68db into main Aug 8, 2022
@pi0 pi0 deleted the fix/404-fatal branch August 8, 2022 12:11
@pi0 pi0 mentioned this pull request Aug 9, 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.

2 participants