# Unexpected 500 on all API-calls

**URL:** <https://community.prismic.io/t/unexpected-500-on-all-api-calls/7641>\
**Category:** Developing with Prismic\
**Tags:** nextjs\
**Created:** [October 28, 2021, 11:14am UTC](https://community.prismic.io/t/unexpected-500-on-all-api-calls/7641 "2021-10-28T11:14:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![prismic15](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/prismic15/32/8539_2.png) [@prismic15](https://community.prismic.io/u/prismic15)\
**Post date:** [October 28, 2021, 11:14am UTC](https://community.prismic.io/t/unexpected-500-on-all-api-calls/7641/1 "2021-10-28T11:14:34Z")

</div>

Hey,

I suddenly got 500 on requests to the API while I was maintaining our webpage yesterday. I did not make any changes that should cause different behaviour towards the API, so I wondered if there is some known internal server errors at the moment? Alternatively; if there is some use limit or potential timeouts visible to administrators/maintainers that I may have exceeded?

I get the following error message in the browser and when trying to build the project (have removed the exact repo-name because it is set to Public):  
_Error: Unexpected status code [500] on URL https://.cdn.prismic.io/api/v2/documents/search?page=1&pageSize=1&ref=YXfj2BMAACQA4lTs&q=%5B%5Bat(document.type%2C%20%22homepage%22)%5D%5D_

What I believe to be a similar topic: [Response 500 for all request to api browser](https://community.prismic.io/t/response-500-for-all-request-to-api-browser/6547)

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Fares](https://avatars.discourse-cdn.com/v4/letter/f/71e660/32.png) [@Fares](https://community.prismic.io/u/Fares)\
**Post date:** [October 28, 2021, 1:21pm UTC](https://community.prismic.io/t/unexpected-500-on-all-api-calls/7641/3 "2021-10-28T13:21:28Z")

</div>

Hi @prismic15

Thanks for reaching out.

Can you please share with us (in a private message if necessary) your repository name, so I try to reproduce the issue on my side  
Also, do you get this error every time you build your project?

Looking forward to your reply,  
Fares

---

<div class="post-metadata">

**Author:** ![prismic15](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/prismic15/32/8539_2.png) [@prismic15](https://community.prismic.io/u/prismic15)\
**Post date:** [October 29, 2021, 7:24am UTC](https://community.prismic.io/t/unexpected-500-on-all-api-calls/7641/4 "2021-10-29T07:24:24Z")

</div>

Repository name sent via private message.

Every time I try to build or launch the dev-version I get the error message when the webpage is trying to collect page data. Technically, the API-calls is done as part of getStaticProps, if thats helpful to reproduce the context.

Note; the errors started occurring on Tuesday, and I have not experienced something similar with Prismic earlier while working on/maintaining the webpage - even with completely similar request/queries.

---

<div class="post-metadata">

**Author:** ![Fares](https://avatars.discourse-cdn.com/v4/letter/f/71e660/32.png) [@Fares](https://community.prismic.io/u/Fares)\
**Post date:** [November 3, 2021, 3:49pm UTC](https://community.prismic.io/t/unexpected-500-on-all-api-calls/7641/6 "2021-11-03T15:49:04Z")

</div>

Hi @prismic15

I've been able to reproduce the issue, and in fact, the error also exists when querying the rest of API, and it seems to be related to JSON responses, as it works when trying to view the content as HTML in the API browser.

For that, I have created an issue in our tracker to have someone from our dev team work on it.

---

<div class="post-metadata">

**Author:** ![Fares](https://avatars.discourse-cdn.com/v4/letter/f/71e660/32.png) [@Fares](https://community.prismic.io/u/Fares)\
**Post date:** [November 8, 2021, 7:39pm UTC](https://community.prismic.io/t/unexpected-500-on-all-api-calls/7641/8 "2021-11-08T19:39:50Z")

</div>

I have got some feedback from our DevOps team that the issue has been fixed for your repo, can you confirm?

---

<div class="post-metadata">

**Author:** ![Phil](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/phil/32/14_2.png) [@Phil](https://community.prismic.io/u/Phil)\
**Post date:** [November 23, 2021, 2:26pm UTC](https://community.prismic.io/t/unexpected-500-on-all-api-calls/7641/11 "2021-11-23T14:26:42Z")

</div>

Threads close after a period of inactivity. [Flag this thread](https://community.prismic.io/t/re-open-a-thread/2175) to re-open it and continue the conversation.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [December 9, 2021, 3:18pm UTC](https://community.prismic.io/t/unexpected-500-on-all-api-calls/7641/12 "2021-12-09T15:18:51Z")

</div>


