APIs & Integrations

ArnaudP
Participant

500 on diverse API calls

SOLVE

Hello,

 

I am experiencing 500 times to times (almost every day). The response body looks like that:

{"status":"error","message":"internal error","correlationId":"36a6f043-78d6-4a9d-9bd6-a19fe1a25430","requestId":"7e46840b75e61da3361986e1a7f8d7c2"}

 

The endpoints on which it happens are:

/contacts/v1/contact/createOrUpdate/email/:email

/deals/v1/deal/paged

 

I have no idea how I can debug these

0 Upvotes
1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

500 on diverse API calls

SOLVE

Thanks for clarifying, @ArnaudP.

 

It's possible that endpoints have different ways of handling rate limits, however I haven't seen any evidence of this in the past.

 

All successful requests should return X-HubSpot-RateLimit-... headers detailing your account's limits and consumption. If you exceed those limits, all endpoints should return 429 errors. Read more in this article.

 

I recommend retrying requests first — the vast majority should succeed. If you're seeing patterns of failure with various endpoints, though, please let me know.

Isaac Takushi

Associate Certification Manager

View solution in original post

0 Upvotes
3 Replies 3
IsaacTakushi
HubSpot Employee
HubSpot Employee

500 on diverse API calls

SOLVE

Hi, @ArnaudP.

 

To be transparent, 500 errors are very difficult for us to troubleshoot as well, so I don't know how much help I can lend here.

 

When you retry these requests, do they go through successfully? The 500 errors we see with our APIs are often transient and can be due to traffic at certain endpoints.

Isaac Takushi

Associate Certification Manager
0 Upvotes
ArnaudP
Participant

500 on diverse API calls

SOLVE

I haven't

 

My guess is that we reach API limit rate, which might be not handled the same way in every endpoints, and some are returning 500s instead of a clear message. The reason I think that is because we have limit rate errors on other endpoints as well

 

We haven't implemented a retry mecanism so far so I don't know if the exact same requests can pass. But I assume that it's the case because most of the requests don't fail

0 Upvotes
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

500 on diverse API calls

SOLVE

Thanks for clarifying, @ArnaudP.

 

It's possible that endpoints have different ways of handling rate limits, however I haven't seen any evidence of this in the past.

 

All successful requests should return X-HubSpot-RateLimit-... headers detailing your account's limits and consumption. If you exceed those limits, all endpoints should return 429 errors. Read more in this article.

 

I recommend retrying requests first — the vast majority should succeed. If you're seeing patterns of failure with various endpoints, though, please let me know.

Isaac Takushi

Associate Certification Manager
0 Upvotes