'How to throw a 500 error from getStaticProps
I have a Nextjs app. I fetch data from a headless CMS to populate the 404 error page. If I don't get a reasonable response from the CMS I'd like to throw a 500 error.
Is this possible from getStaticProps?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|