pipedream
pipedream copied to clipboard
[BUG] Hubspot's "Deal Updated" can get into a perpetual error state due to exceeding rate limit of requests
Describe the bug When the amount of modified changes is high (about 500+), the Deal Updated source needs to paginate through multiple pages of 100 search results each, which causes Hubspot's rate limit of 4 search / sec to be exceeded. This causes an unhandled error, which prevents the Deal Updated from setting the last-checked timestamp. As a result, running the source again, runs into the same problem.
A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
- Add around 1000 new deals into Hubspot.
- Run Deal Updated source
- Observe HTTP 429 error in log
- Run Deal Updated again - same events are emitted. And again, the log shows 429.
Expected behavior All updated events are emitted, and only once.
Additional context
- This behaviour is currently exacerbated by #4208, where on first run events for the entire month are emitted
- The chance of many deal updates happening all at once seem pretty low, but Hubspot has a peculiar behavior where when the Pipeline is updated, all deals'
hs_lastmodifieddate
property is updated. This can cause this bug, but also an undesired behavior overall, since there's no way currently to specify which property is being observed for changes. - The right approach is to use webhooks, per #4120.
Thanks Dan. I'm adding this to the team's backlog.
For whomever picks this up - see #4208 , as well.