# Looping Through companies API, I randomly get an error part way through.

**URL:** <https://community.hubspot.com/t/looping-through-companies-api-i-randomly-get-an-error-part-way-through/12883>\
**Category:** APIs & Integrations\
**Tags:** companies\
**Created:** [February 8, 2019, 9:19pm UTC](https://community.hubspot.com/t/looping-through-companies-api-i-randomly-get-an-error-part-way-through/12883 "2019-02-08T21:19:33Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![hot\_z](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/hot_z/32/86357_2.png) [@hot\_z](https://community.hubspot.com/u/hot_z)\
**Post date:** [February 11, 2019, 7:54am UTC](https://community.hubspot.com/t/looping-through-companies-api-i-randomly-get-an-error-part-way-through/12883/2 "2019-02-11T07:54:02Z")

</div>

Hi there,

I think that there is a possibility that your issue is related to what happened in [https://community.hubspot.com/t5/APIs-Integrations/Get-all-companies-throws-random-HTTP-500-errors/m-p/251587](https://community.hubspot.com/t5/APIs-Integrations/Get-all-companies-throws-random-HTTP-500-errors/m-p/251587). Is this still happening for you now?

---

_[View the full topic](https://community.hubspot.com/t/looping-through-companies-api-i-randomly-get-an-error-part-way-through/12883)._
