How to stop the next build in case of errors
Unanswered
Holland Lop posted this in #help-forum
Holland LopOP
We are using nextjs together with a headless CMS. When content is updated in the CMS a new next build is triggered. I wonder if there is an option to exit/stop a build in case of errors, for example if some content was not configured correctly. Currently we are fetching this data inside a server component.
2 Replies
You can just trhrow an error if the content you get is malformed and the build will fail.
Holland LopOP
I will give it a go 🙂