<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Betreff: 429 API Rate Limit Error in Data Hub</title>
    <link>https://community.hubspot.com/t5/Data-Hub/429-API-Rate-Limit-Error/m-p/597437#M754</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/241684"&gt;@ChrisoKlepke&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for reaching out to the Community!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I want to tag in some subject matter experts to see if they have any suggestions.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/193060"&gt;@JBeatty&lt;/a&gt;,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/144301"&gt;@taran42&lt;/a&gt;,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/328782"&gt;@A_Wessolly&lt;/a&gt;,&amp;nbsp;do you have any thoughts on this? Thank you!!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers&lt;BR /&gt;Mia, Community Team&lt;/P&gt;</description>
    <pubDate>Fri, 18 Mar 2022 14:41:04 GMT</pubDate>
    <dc:creator>MiaSrebrnjak</dc:creator>
    <dc:date>2022-03-18T14:41:04Z</dc:date>
    <item>
      <title>429 API Rate Limit Error</title>
      <link>https://community.hubspot.com/t5/Data-Hub/429-API-Rate-Limit-Error/m-p/595685#M750</link>
      <description>&lt;P&gt;Hey RevOps-Gang,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;hope you're all doing well. I encountered a problem in a Custom Code Action recently which I thought HubSpot took care of, on its own, but I might be wrong. I have a Python-based action that does multiple requests against the HubSpot API. Some requests cannot be done with the api-library (e.g. HubDB stuff with filtering and sorting) so I use the &lt;STRONG&gt;requests&lt;/STRONG&gt; library for that.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As mentioned in the documentation &lt;A href="https://developers.hubspot.com/docs/api/workflows/custom-code-actions" target="_blank" rel="noopener"&gt;here&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;If the call fails due to a rate limiting error, or a 429 or 5XX error from&amp;nbsp;&lt;A href="https://www.npmjs.com/package/axios" target="_blank" rel="noopener noreferrer" data-sk="tooltip_parent"&gt;axios&lt;/A&gt;&amp;nbsp;or&amp;nbsp;&lt;A href="https://www.npmjs.com/package/@hubspot/api-client" target="_blank" rel="noopener noreferrer" data-sk="tooltip_parent"&gt;@hubspot/api-client&lt;/A&gt;, HubSpot will reattempt to execute your action for up to three days, starting one minute after failure. Subsequent failures will be retried at increasing intervals, with a maximum gap of eight hours between tries&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not entirely sure, but this should also mean that calls with the requests library are also retried if it encounters a rate limit error, correct?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Most of these calls follow this pattern with &lt;EM&gt;try&lt;/EM&gt; and &lt;EM&gt;except&lt;/EM&gt; statements:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;try&lt;/SPAN&gt;:&lt;BR /&gt;    getPlantContent = requests.&lt;SPAN&gt;get&lt;/SPAN&gt;(&lt;BR /&gt;        &lt;SPAN&gt;"https://api.hubapi.com/cms/v3/hubdb/tables/plant_content/rows?" &lt;/SPAN&gt;+ plantContentProperties + plantContentFilters + &lt;SPAN&gt;"&amp;amp;hapikey=" &lt;/SPAN&gt;+ os.&lt;SPAN&gt;getenv&lt;/SPAN&gt;(&lt;BR /&gt;            &lt;SPAN&gt;"HAPIKEY"&lt;/SPAN&gt;)).&lt;SPAN&gt;json&lt;/SPAN&gt;()[&lt;SPAN&gt;"results"&lt;/SPAN&gt;][&lt;SPAN&gt;0&lt;/SPAN&gt;][&lt;SPAN&gt;"values"&lt;/SPAN&gt;]&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;except &lt;/SPAN&gt;ApiException &lt;SPAN&gt;as &lt;/SPAN&gt;e:&lt;BR /&gt;    &lt;SPAN&gt;print&lt;/SPAN&gt;(&lt;SPAN&gt;"Exception when calling rows_api-&amp;gt;get_table_rows: %s&lt;/SPAN&gt;&lt;SPAN&gt;\n&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;% e)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, I've noticed that this is missing the raise keyword in the except block. Is this of importance? If so, what does it do? The only info I found is that it re-raises the exception if there is no other argument associated with raise.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you all for your help! Please be easy on me since I'm not a trained dev.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Chriso&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 08:27:48 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/429-API-Rate-Limit-Error/m-p/595685#M750</guid>
      <dc:creator>ChrisoKlepke</dc:creator>
      <dc:date>2022-03-16T08:27:48Z</dc:date>
    </item>
    <item>
      <title>Betreff: 429 API Rate Limit Error</title>
      <link>https://community.hubspot.com/t5/Data-Hub/429-API-Rate-Limit-Error/m-p/597437#M754</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/241684"&gt;@ChrisoKlepke&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for reaching out to the Community!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I want to tag in some subject matter experts to see if they have any suggestions.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/193060"&gt;@JBeatty&lt;/a&gt;,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/144301"&gt;@taran42&lt;/a&gt;,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/328782"&gt;@A_Wessolly&lt;/a&gt;,&amp;nbsp;do you have any thoughts on this? Thank you!!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers&lt;BR /&gt;Mia, Community Team&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 14:41:04 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/429-API-Rate-Limit-Error/m-p/597437#M754</guid>
      <dc:creator>MiaSrebrnjak</dc:creator>
      <dc:date>2022-03-18T14:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: 429 API Rate Limit Error</title>
      <link>https://community.hubspot.com/t5/Data-Hub/429-API-Rate-Limit-Error/m-p/616205#M823</link>
      <description>&lt;P&gt;Looking at this phrase....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the call fails due to a rate limiting error, or a 429 or 5XX error from&amp;nbsp;axios&amp;nbsp;or&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/63720"&gt;@hubspot&lt;/a&gt;/api-client, HubSpot will reattempt to execute your action for up to three days, starting one minute after failure. Subsequent failures will be retried at increasing intervals, with a maximum gap of eight hours between tries&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unless your script is also going to run long to take full advantage of the long time span of re-trying you shouldn't count on this. When you're running into persistent API rate limiting issues, you'll want to consider some level of decoupling to your flow. I would suggest looking into making a job queue to break up your processes up so that you're better able to regulate the API calls&lt;/P&gt;</description>
      <pubDate>Sat, 16 Apr 2022 13:34:28 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/429-API-Rate-Limit-Error/m-p/616205#M823</guid>
      <dc:creator>tfoston01</dc:creator>
      <dc:date>2022-04-16T13:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: 429 API Rate Limit Error</title>
      <link>https://community.hubspot.com/t5/Data-Hub/429-API-Rate-Limit-Error/m-p/617783#M828</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/289041"&gt;@tfoston01&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much for getting in on this. I was aware of this sentence in the documentation. What I'm confused by is the wording of that sentence. It seems to me the code action should retry itself if one of the 3 scenarios applies.&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;call fails due to a rate limiting error, &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;or a 429 or 5XX error from&amp;nbsp;axios&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;or&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/63720" target="_blank"&gt;@hubspot&lt;/A&gt;&lt;SPAN&gt;/api-client,&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;If I use the requests library and run into a 429 I think the first bullet applies, but in no instance got the action retried. That's why I suspected something wrong with my code, or more specifically the exception, since it also says in the documentation:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;If you're using Python and encounter a rate limiting error but you want HubSpot to retry your call, you'll need to raise the error in the&amp;nbsp;&lt;CODE&gt;except&lt;/CODE&gt;&amp;nbsp;block of your custom code action.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, either I'm doing something wrong, or the documentation is wrong in that, that the retries are not supported with the requests library. What are your thoughts on this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In any case, you mentioned a job queue to get around all of that. How would someone create something like that in the custom code action? Is there something you can point me to?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Chriso&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 06:41:19 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/429-API-Rate-Limit-Error/m-p/617783#M828</guid>
      <dc:creator>ChrisoKlepke</dc:creator>
      <dc:date>2022-04-19T06:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: 429 API Rate Limit Error</title>
      <link>https://community.hubspot.com/t5/Data-Hub/429-API-Rate-Limit-Error/m-p/618668#M831</link>
      <description>&lt;P&gt;The documentation is wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From experience, the SDK will retry a failed API call 6 times max. After that, it stops retrying and you're on your own to essentially restart things yourself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At A8Labs, we actually don't use the SDK and instead make the API calls ourselves using&amp;nbsp;&lt;/P&gt;&lt;P&gt;the axios library. We evaluate the response headers and look for the rate-limiting headers specifically and take pauses/sleep if we can anticipate a 429 coming.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For job queueing and decoupling, please check out the article below&lt;/P&gt;&lt;P&gt;&lt;A href="https://towardsaws.com/aws-sqs-the-ultimate-decoupling-solution-de8a8c8862e7" target="_blank"&gt;https://towardsaws.com/aws-sqs-the-ultimate-decoupling-solution-de8a8c8862e7&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 04:36:03 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/429-API-Rate-Limit-Error/m-p/618668#M831</guid>
      <dc:creator>tfoston01</dc:creator>
      <dc:date>2022-04-20T04:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: 429 API Rate Limit Error</title>
      <link>https://community.hubspot.com/t5/Data-Hub/429-API-Rate-Limit-Error/m-p/618693#M832</link>
      <description>&lt;P&gt;Thank you for the insight&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/289041"&gt;@tfoston01&lt;/a&gt;&amp;nbsp;. I'm not that familiar with JS and/or axios but if that's the limitation for Python and the requests library right now I will give this issue to more qualified people than me.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/101262"&gt;@MiaSrebrnjak&lt;/a&gt;, it might be a good idea to check the documentation with the responsible team again and change it if it proves to be confusing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/5724"&gt;@jackcoldrick&lt;/a&gt;&amp;nbsp;or&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/117612"&gt;@jbogaert&lt;/a&gt;&amp;nbsp;are the right people for this?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 06:24:05 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/429-API-Rate-Limit-Error/m-p/618693#M832</guid>
      <dc:creator>ChrisoKlepke</dc:creator>
      <dc:date>2022-04-20T06:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: 429 API Rate Limit Error</title>
      <link>https://community.hubspot.com/t5/Data-Hub/429-API-Rate-Limit-Error/m-p/618874#M833</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/241684"&gt;@ChrisoKlepke&lt;/a&gt;, thank you for flagging this! I'll send it to our technical writers for a review!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers&lt;BR /&gt;Mia, Community Team&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 12:42:10 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/429-API-Rate-Limit-Error/m-p/618874#M833</guid>
      <dc:creator>MiaSrebrnjak</dc:creator>
      <dc:date>2022-04-20T12:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: 429 API Rate Limit Error</title>
      <link>https://community.hubspot.com/t5/Data-Hub/429-API-Rate-Limit-Error/m-p/968601#M2289</link>
      <description>&lt;P&gt;Hey! We've built an app that will be able to help you with this. It's called Time Turner, and it allows you to &lt;A href="https://app.hubspot.com/l/ecosystem/marketplace/apps/_detail/time-turner-workflow-email-drip-feeder" target="_blank" rel="noopener"&gt;throttle your HubSpot workflows&lt;/A&gt; and drip-feed your emails out over time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know what you think?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://app.hubspot.com/l/ecosystem/marketplace/apps/_detail/time-turner-workflow-email-drip-feeder" target="_blank" rel="noopener"&gt;Here's the install link for Time Turner!&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2024 20:07:33 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/429-API-Rate-Limit-Error/m-p/968601#M2289</guid>
      <dc:creator>Unmatched</dc:creator>
      <dc:date>2024-04-29T20:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: 429 API Rate Limit Error</title>
      <link>https://community.hubspot.com/t5/Data-Hub/429-API-Rate-Limit-Error/m-p/992260#M2374</link>
      <description>&lt;P&gt;It just doesnt work.&amp;nbsp; I get rate limit errors on workflows that have no APIs or custom codes.&amp;nbsp; Its ridiculous.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2024 07:35:05 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/429-API-Rate-Limit-Error/m-p/992260#M2374</guid>
      <dc:creator>dthreatt</dc:creator>
      <dc:date>2024-06-14T07:35:05Z</dc:date>
    </item>
  </channel>
</rss>

