Replies: 1 comment 1 reply
-
Errors thrown from getStaticProps will cause the build to fail |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I couldn't find anything about thrown errors in
getStaticProps
in the docs. For example when an API request fails. I hope that this would cause a build error?If not, that could cause compiling an error into the static page undetected, being fatal on deployment. If it would cause a build error, still we would need to not use
try/catch
for API calls, otherwise we would run into the same issue.https://nextjs.org/docs/basic-features/data-fetching#getstaticprops-static-generation
Beta Was this translation helpful? Give feedback.
All reactions