Skip to content

Commit

Permalink
Catched client exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 committed Nov 18, 2018
1 parent c978a2a commit daa4a96
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Connection/HTTPlugConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

use Core23\SetlistFm\Exception\ApiException;
use Core23\SetlistFm\Exception\NotFoundException;
use Http\Client\Exception;
use Http\Client\HttpClient;
use Http\Message\MessageFactory;
use Psr\Http\Message\ResponseInterface;
Expand Down Expand Up @@ -74,6 +75,8 @@ public function call(string $method, array $params = [], string $requestMethod =
throw $e;
} catch (\Exception $e) {
throw new ApiException('Technical error occurred.', 500, $e);
} catch (Exception $e) {
throw new ApiException('Technical error occurred.', 500, $e);
}
}

Expand Down

0 comments on commit daa4a96

Please sign in to comment.