Hi, our builds are suddenly failing with 500 errors. I've been trying to track down the cause but it seems nothing has changed in our codebase recently.
I looked through the prismic documentation and I can't find a reference to xxx.cdn.prismic.io endpoints anymore, but changing it to xxx.prismic.io within our sm.json doesn't seem to stop it being called, which makes me wonder whether we have an outdated package that is making this call.
I've removed the public key from the call below. If you need it I can send it to you privately.
Thanks
Error: Error: Unexpected status code [500] on URL https://pila.cdn.prismic.io/api/v2/documents/search?page=1&pageSize=20&routes=%5B%7B%22type%22%3A%22home%22%2C%22path%22%3A%22%2F%22%7D%2C%7B%22type%22%3A%22theme_page%22%2C%22path%22%3A%22%2F%3Auid%22%7D%2C%7B%22type%22%3A%22learning_module_home%22%2C%22path%22%3A%22%2Flearning_modules%22%7D%2C%7B%22type%22%3A%22learning_module%22%2C%22path%22%3A%22%2F%3Aparent%2F%3Auid%22%2C%22resolvers%22%3A%7B%22parent%22%3A%22parent%22%7D%7D%2C%7B%22type%22%3A%22assessment_application%22%2C%22path%22%3A%22%2F%3Aparent%2F%3Amodule%2F%3Auid%22%2C%22resolvers%22%3A%7B%22module%22%3A%22module%22%2C%22parent%22%3A%22module.parent%22%7D%7D%2C%7B%22type%22%3A%22detail_page%22%2C%22path%22%3A%22%2F%3Aparent%2F%3Auid%22%2C%22resolvers%22%3A%7B%22parent%22%3A%22parent%22%7D%7D%2C%7B%22type%22%3A%22guide_home%22%2C%22path%22%3A%22%2Fguides%22%7D%2C%7B%22type%22%3A%22guide%22%2C%22path%22%3A%22%2Fguides%2F%3Auid%22%7D%2C%7B%22type%22%3A%22form%22%2C%22path%22%3A%22%2Fcontact%22%7D%2C%7B%22type%22%3A%22sessions%22%2C%22path%22%3A%22%2Faccount%2Fsessions%22%7D%5D&ref=YjRXBRAAACMAv0Af&q=%5B%5Bin(document.id%2C%20%5B%22YCZWKREAAI5deynI%22%2C%22YDjtUhEAACQAVSfd%22%2C%XXXXXXXXXXX%22%5D)%5D%5D
Actually, the CDN is necessary in all cases and shouldn't cause an issue, but can you please tell us how often you get this error and what is the technology/framework used.
Also, I would like to confirm; is pila is the repository name you are using and having errors related to? If not, can you please send us the repository name (in a private message if necessary) to check if we have any errors on our side?
I've looked at the logs related to your repository, and there seem no recent errors happening, and it seems that those errors are on your end.
Are you using a proxy in your network?
Also, if you can share with us a zip file with your project code (in a private message if necessary) to try to reproduce the issue on our end, it will be really helpful.
Fares is out of the office the whole of this week. So far, I found that you have some issues in routes learning_module and assessment_application. I am trying to debug it more and return it to you as I find something.
I have one question for you:
Are you able to run your project locally because I get an error when I run locally?
Yes that is the error I'm facing. When the project builds it fetches a bunch of data for all the routes in _app.tsx. It's there i'm getting the 500 error you have shown above. I sent Fares some of findings. Are you able to access his direct messages?
Hi @daveymoores,
I was off for a few days, I'm currently building your project locally and trying to reproduce the issue on my side to be able to debug the issue, and I will let you know about my finding as soon as possible.
I'm still investigating this; this error usually means that you have written the resolver incorrectly or have documents in that list without the content relationship selected (I've checked your repo, and it doesn't seem to be the case).
I will let you know as soon as we have any updates.
Thanks Fares, our builds are now passing. It's strange how this randomly started failing without any code changes but at least it's all working correctly