Skip to content

Commit

Permalink
🔥 Remove unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
marcreichel committed Jun 5, 2021
1 parent c580e61 commit 809b680
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions src/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -1470,33 +1470,6 @@ function () use ($endpoint) {
return $data;
}

/**
* @param $exception
*
* @return void
*
* @throws ServiceException
* @throws ServiceUnavailableException
* @throws UnauthorizedException
*/
private function handleRequestException($exception): void
{
if ($exception instanceof ClientException) {
if ($exception->getCode() === Response::HTTP_UNAUTHORIZED) {
$message = 'Invalid User key or no user key';
throw new UnauthorizedException($message);
}
} elseif ($exception instanceof ServerException) {
if ($exception->getCode() === Response::HTTP_SERVICE_UNAVAILABLE) {
$message = 'IGDB is down right now. Please try again later.';
throw new ServiceUnavailableException($message);
}
if ($exception->getCode() === Response::HTTP_INTERNAL_SERVER_ERROR) {
throw new ServiceException($exception->getMessage());
}
}
}

/**
* Execute a query for a single record by ID.
*
Expand Down

0 comments on commit 809b680

Please sign in to comment.