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(vue-app): handle promise rejection from asyncData
#18585
Conversation
Β Open in CodeSandbox Web Editor | VS Code | VS Code Insiders |
Codecov ReportBase: 66.18% // Head: 66.18% // No change to project coverage π
Additional details and impacted files@@ Coverage Diff @@
## 2.x #18585 +/- ##
=======================================
Coverage 66.18% 66.18%
=======================================
Files 93 93
Lines 4096 4096
Branches 1158 1158
=======================================
Hits 2711 2711
Misses 1119 1119
Partials 266 266
Flags with carried forward coverage won't be shown. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. β View full report at Codecov. |
any prospects for getting this merged? |
asyncData
When exception is thrown during handling of
asyncData
, Nuxt catches it and shows server error but it also chains returned promise without usingcatch
. This results in unhandled promise rejection.π Linked issue
β Type of change
π Description
The original code
nuxt/packages/vue-app/template/server.js
Lines 320 to 325 in e5efc25
gets the
asyncData
promise and chains it toapplyAsyncData
. Thatthen
doesn't run whenasyncData
has thrown but since this promise is not further chained (especially tocatch
) it effectively makes it an unhandled promise rejection error.π Checklist