diff --git a/index.php b/index.php index 7e3534a..bb6b56b 100644 --- a/index.php +++ b/index.php @@ -9,6 +9,7 @@ use Dotenv\Dotenv; use Hitrov\Exception\ApiCallException; +use Hitrov\Exception\TooManyRequestsWaiterException; use Hitrov\FileCache; use Hitrov\OciApi; use Hitrov\OciConfig; @@ -112,6 +113,9 @@ // current config is broken return; + } catch(TooManyRequestsWaiterException $e) { + echo $e->getMessage(); + return; } // success diff --git a/src/OciApi.php b/src/OciApi.php index 6dad3a9..6661a6e 100644 --- a/src/OciApi.php +++ b/src/OciApi.php @@ -46,7 +46,7 @@ public function createInstance( if (isset($this->waiter) && $this->waiter->isConfigured()) { if ($this->waiter->isTooEarly()) { throw new TooManyRequestsWaiterException( - "Will retry after {$this->waiter->secondsRemaining()} seconds", + "TooManyRequests, Will retry after {$this->waiter->secondsRemaining()} seconds", ); }