Skip to content

Commit

Permalink
Handle ten second rate limit
Browse files Browse the repository at this point in the history
In the case a lot of email messages are sent and needed to be tracked within HubSpot we receive the following error message "You have reached your ten_secondly_rolling limit.". 

The retries should split the burst regarding the ten second rate limit.
  • Loading branch information
xolf authored Jul 12, 2024
1 parent 8e6e73e commit f92699b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/HubspotEmailChannel.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ protected function callApi(string $baseUrl, string $method, array $params = []):
$params['hapikey'] = $apiKey;
}

$http = Http::acceptJson();
$http = Http::acceptJson()->retry(3, 11 * 1000);

if (is_null($apiKey)) {
if (is_null(config('hubspot.access_token'))) {
Expand Down

0 comments on commit f92699b

Please sign in to comment.