Skip to content
This repository has been 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
merged 1 commit into from
Aug 8, 2022
Merged

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 unjs/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.

None yet

2 participants