diff --git a/Api/Data/ResultInterface.php b/Api/Data/ResultInterface.php index cb076ed..f991823 100644 --- a/Api/Data/ResultInterface.php +++ b/Api/Data/ResultInterface.php @@ -1,18 +1,53 @@ setResponseData($exceptionMessage); $notifierResult->setIsRetryable(true); - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After if ($response->hasHeader('Retry-After')) { $retryAfter = $response->getHeader('Retry-After')[0]; - $notifierResult->setRetryAfter((int) $retryAfter); + if (is_numeric($retryAfter)) { + $notifierResult->setRetryAfter((int) $retryAfter); + } } - } else { $notifierResult->setResponseData( $exception->getMessage()