File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -101,12 +101,12 @@ public function doFileRequest(string $uri, array $params = [])
101
101
return $ response ->getBody ()->getContents ();
102
102
} catch (\GuzzleHttp \Exception \ClientException $ exception ) {
103
103
if ($ exception ->getCode () == 401 ) {
104
- throw new UnauthorizedException ('Request unauthorized ' );
104
+ throw new UnauthorizedException ('Request unauthorized ' , 401 );
105
105
}
106
106
107
- throw new \FreshMail \ApiV2 \ClientException (sprintf ( ' Connection error, error message: ' . $ exception ->getMessage () ));
107
+ throw new \FreshMail \ApiV2 \ClientException ($ exception -> getMessage (), $ exception ->getResponse ()-> getStatusCode ( ));
108
108
} catch (\GuzzleHttp \Exception \ConnectException $ exception ) {
109
- throw new ConnectionException (sprintf ( ' Connection error, error message: ' . $ exception ->getMessage () ));
109
+ throw new ConnectionException ($ exception ->getMessage ());
110
110
}
111
111
}
112
112
You can’t perform that action at this time.
0 commit comments