Skip to content
New issue

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

fix(nuxt): throw errors when running legacy asyncData #20535

Merged
merged 10 commits into from Apr 27, 2023

Conversation

huang-julien
Copy link
Member

@huang-julien huang-julien commented Apr 26, 2023

πŸ”— Linked issue

resolve #19625

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 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)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Currently nothing happens when an error si thrown in the legacy asyncData. This PR add showError when an asyncData throws an error.
Useful for users that are migrating from Nuxt 2 or option API users

πŸ“ Checklist

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

@codesandbox
Copy link

codesandbox bot commented Apr 26, 2023

CodeSandbox logoCodeSandbox logoΒ  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

test/basic.test.ts Outdated Show resolved Hide resolved
Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

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

Nice πŸ‘Œ

@danielroe danielroe changed the title fix(nuxt): showError on legacyAsyncData error fix(nuxt): throw errors when running legacy asyncData Apr 27, 2023
test/basic.test.ts Outdated Show resolved Hide resolved
test/basic.test.ts Outdated Show resolved Hide resolved
@danielroe danielroe changed the title fix(nuxt): throw errors when running legacy asyncData fix(nuxt): throw errors when running legacy asyncData Apr 27, 2023
@danielroe danielroe merged commit ecf4153 into nuxt:main Apr 27, 2023
17 checks passed
This was referenced Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Any exception from asyncData will be discard in Nuxt 3
2 participants