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
Hidden error with await rejected promise inside getStaticPaths #32180
Comments
It is generally a good idea to reject with an Currently, this is why you are getting that message. Next.js checks if the thrown error is an instance of next.js/packages/next/build/index.ts Line 1027 in cffd209
|
Hmmmm. interesting... But anyway this seems not an obviously: we have exception, but can't take reason and error message related to page without a React Component |
@balazsorban44 is it possibly do more relevant error message? without changing nested promise as workaround, of course i can
but this looks ugly |
|
No, this work only if promise rejected with This is a problem to detect real error reason. |
Hi, this should be fixed in the latest version of Next.js Related fix: #33753 |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
What version of Next.js are you using?
12.0.0
What version of Node.js are you using?
14.16.0, 15.9.0
What browser are you using?
any browser
What operating system are you using?
macOS
How are you deploying your application?
next build
Describe the Bug
if in async function
getStaticPaths
error raised in some nested async function, called with await, like thisthen when execute
next build
in console would be output justinstead normal error message. If throw error directly - then log is fine
Expected Behavior
output concrete error message
To Reproduce
https://stackblitz.com/edit/nextjs-pnhrbs?file=pages/dyn/[num].jsx
To reproduce run:
next build
enough
The text was updated successfully, but these errors were encountered: