Error when turning preview to true

I located that the build fails because of a fetch response that sends Internal Server Error, and it is happening since a certain version of our project
If I request the same endpoint with the previous version the proper response returns as expected.
So it seems a certain configuration in our project causes the build to fail, so if we were to know the culprit, we might have a chance to fix it ourselves.

Great feedback, thanks for reporting! Yes, we should make the errors include more transparent details to help users track down where the issue is coming from…