We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a017521 commit c6d426cCopy full SHA for c6d426c
src/Client.php
@@ -251,7 +251,7 @@ protected function handleRequestError(ResponseInterface $response)
251
}
252
253
if ($response->getStatusCode() == 401 || $response->getStatusCode() == 403) {
254
- throw new UnauthorizedException();
+ throw new UnauthorizedException((string) $response->getBody());
255
256
257
if ($response->getStatusCode() == 400) {
src/Exceptions/UnauthorizedException.php
@@ -4,5 +4,13 @@
4
5
class UnauthorizedException extends \Exception
6
{
7
- //
+ /**
8
+ * Create a new exception instance.
9
+ *
10
+ * @param string $message
11
+ */
12
+ public function __construct(string $message = '')
13
+ {
14
+ parent::__construct($message);
15
+ }
16
0 commit comments