# Sporadic but frequent "Unexpected error"

**URL:** <https://community.shiphero.com/t/sporadic-but-frequent-unexpected-error/334>\
**Category:** GraphQL API\
**Created:** [February 12, 2020, 11:27pm UTC](https://community.shiphero.com/t/sporadic-but-frequent-unexpected-error/334 "2020-02-12T23:27:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fairweather](https://avatars.discourse-cdn.com/v4/letter/f/7c8e57/32.png) [@fairweather](https://community.shiphero.com/u/fairweather)\
**Post date:** [February 12, 2020, 11:27pm UTC](https://community.shiphero.com/t/sporadic-but-frequent-unexpected-error/334/1 "2020-02-12T23:27:00Z")

</div>

I have been building an integration with our ERP and keep getting random {“message”: “Unexpected error. Please contact a system administrator.”} when I run simple queries such as user\_quota queries:

{  
user\_quota {  
credits\_remaining  
max\_available  
increment\_rate  
}  
}

It will error out and then I wait a few seconds and try again and it works. It has been very frustrating and gives me a bad feeling about the stability of this API. Is this a common occurrence that just needs to be handled?

---

<div class="post-metadata">

**Author:** ![fairweather](https://avatars.discourse-cdn.com/v4/letter/f/7c8e57/32.png) [@fairweather](https://community.shiphero.com/u/fairweather)\
**Post date:** [February 13, 2020, 10:14pm UTC](https://community.shiphero.com/t/sporadic-but-frequent-unexpected-error/334/3 "2020-02-13T22:14:51Z")

</div>

After some more debugging the response I am getting the most from the POST is:

{StatusCode: 500, ReasonPhrase: ‘INTERNAL SERVER ERROR’, Version: 1.1, Content: System.Net.Http.StreamContent, Headers:  
{  
Connection: keep-alive  
Date: Thu, 13 Feb 2020 22:06:38 GMT  
Server: gunicorn/19.9.0  
Content-Length: 71  
Content-Type: text/html; charset=utf-8  
}}

Again, it happens sporadically about once every 2-10 calls. Any thoughts on what do I might try to get a more reliable connection would be helpful.
