APIs & Integrations

chriz
Participant

Get all companies throws random HTTP 500 errors

SOLVE

We are every now and then collecting all companies from hubspot. Yesterday night at 11pm, we started to get HTTP status 500 without any description. 

 

We are using the paging and do this in a loop until has-more is false. We've a Thread.sleep(350) in the loop to not hit any rate limit.

 

I've debugged the situation and it is breaking each time at a different offset. If I copy the offset and run the query outside of our app, it is working ok.

 

This is the query we use

https://api.hubapi.com/companies/v2/companies/paged?limit=250&properties=name&properties=website&pro...

I'm now trying to fix this by retrying if there's an exception, but can you please have a look and report back? Thx.

1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Get all companies throws random HTTP 500 errors

SOLVE

Hi, @chriz and @0divide.

 

Thank you both for the feedback. 

 

Sincere apologies for the trouble. This was due to an issue on our end which seems to have begun Thursday evening, but it now seems fully resolved. Our team is investigating the cause further and I'll update here with as much information as I can.

 

Please let me know if you continue to experience these 500 internal error issues with the Get all companies endpoint.

Isaac Takushi

Associate Certification Manager

View solution in original post

0 Upvotes
6 Replies 6
0divide
Participant

Get all companies throws random HTTP 500 errors

SOLVE

Exactly the same problem for me since this morning (8 Feb 2019, GMT+1)

I tried with a Thread.sleep from 500 to 10000.

 

 

0 Upvotes
chriz
Participant

Get all companies throws random HTTP 500 errors

SOLVE

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 🙂

0 Upvotes
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Get all companies throws random HTTP 500 errors

SOLVE

Hi, @chriz and @0divide.

 

Thank you both for the feedback. 

 

Sincere apologies for the trouble. This was due to an issue on our end which seems to have begun Thursday evening, but it now seems fully resolved. Our team is investigating the cause further and I'll update here with as much information as I can.

 

Please let me know if you continue to experience these 500 internal error issues with the Get all companies endpoint.

Isaac Takushi

Associate Certification Manager
0 Upvotes
0divide
Participant

Get all companies throws random HTTP 500 errors

SOLVE

Hello,

 

The problem seems to be resolved.

Thx for your support

chriz
Participant

Get all companies throws random HTTP 500 errors

SOLVE

Yep. seems that this is resolved. Can I mark something as resolved in this forum? I don't think so right?

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Get all companies throws random HTTP 500 errors

SOLVE

Hey, @chriz.

 

The closest thing in this community is the "Solved" tag, which you can set by clicking Accept as Solution on a post.

Isaac Takushi

Associate Certification Manager
0 Upvotes