diff --git a/src/Tails.php b/src/Tails.php index 13ad726..ac1e293 100644 --- a/src/Tails.php +++ b/src/Tails.php @@ -25,7 +25,7 @@ public static function getResponse($project){ } $response = Http::withToken( $apiKey )->get($endpoint); if(!$response->ok()){ - $this->handleErrorResponse($response); + self::handleErrorResponse($response); } $jsonResponse = (object)$response->json(); if(isset($jsonResponse->header)){ @@ -45,7 +45,7 @@ public static function getCacheArray(){ $response = Http::withToken( $apiKey )->get($endpoint); if(!$response->ok()){ - $this->handleErrorResponse($response); + self::handleErrorResponse($response); } $jsonResponse = (object)$response->json(); @@ -53,7 +53,7 @@ public static function getCacheArray(){ return $jsonResponse; } - private function handleErrorResponse($response){ + public static function handleErrorResponse($response){ $errorType = ''; if($response->clientError()){ $errorType = 'Client Error';