Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"vlucas/phpdotenv": "^5.6.1"
},
"require-dev": {
"phpunit/phpunit": "^12.0.0",
"phpunit/phpunit": "^9.6.21",
"squizlabs/php_codesniffer": "*"
},
"autoload": {
Expand Down
4 changes: 2 additions & 2 deletions src/SDK/API.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

class API
{
private const RETRYABLE_STATUS_CODES = [503, 521, 522, 524, 530];
private const RETRYABLE_STATUS_CODES = [503, 520, 521, 522, 524, 530];

private $httpClient;
private $projectId;
Expand Down Expand Up @@ -244,7 +244,7 @@ public function generateJwtResponse(array $responseBody, ?string $refreshToken =

/**
* Executes an HTTP request callable, retrying on transient status codes
* (503, 521, 522, 524, 530) with delays of 100ms, 5s, 5s.
* (503, 520, 521, 522, 524, 530) with delays of 100ms, 5s, 5s.
* Non-retryable RequestExceptions are re-thrown immediately.
*
* @param callable $requestFn Zero-argument callable that performs the Guzzle request.
Expand Down
2 changes: 1 addition & 1 deletion src/tests/APIRetryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function testRetriesOnRetryableStatusCodeAndSucceedsOnSecondAttempt(int $

public static function retryableStatusCodeProvider(): array
{
return [[503], [521], [522], [524], [530]];
return [[503], [520], [521], [522], [524], [530]];
}

public function testRetriesUpToThreeTimesAndThrowsOnExhaustion(): void
Expand Down