# Get all companies throws random HTTP 500 errors

**URL:** <https://community.hubspot.com/t/get-all-companies-throws-random-http-500-errors/12865>\
**Category:** APIs & Integrations\
**Tags:** companies\
**Created:** [February 8, 2019, 8:20am UTC](https://community.hubspot.com/t/get-all-companies-throws-random-http-500-errors/12865 "2019-02-08T08:20:56Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![chriz](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/chriz/32/43030_2.png) [@chriz](https://community.hubspot.com/u/chriz)\
**Post date:** [February 8, 2019, 10:45am UTC](https://community.hubspot.com/t/get-all-companies-throws-random-http-500-errors/12865/3 "2019-02-08T10:45:24Z")

</div>

Increasing the sleep time does not help. It is an error on their side. If you hit a rate limit, the error is different. I fixed this by a simple retry strategy, but still they need to fix the root cause at their side.

Furthermore, the api itself is failing every now and then and throw random bulls\*\*t errors. Sometimes I get a complete error page as a response, therefor a retry seems to be a good idea as long as the api is so unstable. I wish it would be a bit more like Stripe. Those guys offering api clients doing retries and paging within the client itself 🙂

---

_[View the full topic](https://community.hubspot.com/t/get-all-companies-throws-random-http-500-errors/12865)._
