File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 1313use Vin \ShopwareSdk \Data \AccessToken ;
1414use Vin \ShopwareSdk \Data \EndPointTrait ;
1515use Vin \ShopwareSdk \Exception \AuthorizationFailedException ;
16+ use Vin \ShopwareSdk \Exception \ShopwareResponseException ;
1617use Vin \ShopwareSdk \Exception \ShopwareUnreachableException ;
1718
1819class AdminAuthenticator
@@ -59,7 +60,7 @@ public function fetchAccessToken(): AccessToken
5960 'headers ' => self ::$ headers ,
6061 'form_params ' => $ formParams
6162 ]);
62- } catch (BadResponseException $ exception ) {
63+ } catch (ShopwareResponseException $ exception ) {
6364 throw new AuthorizationFailedException (
6465 $ exception ->getResponse ()->getBody ()->getContents (),
6566 $ exception ->getCode (),
Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ private static function handleException(\Throwable $exception): \Throwable
192192
193193 if ($ exception instanceof ClientException || $ exception instanceof ServerException) {
194194 $ message = $ exception ->getResponse ()->getBody ()->getContents ();
195- return new ShopwareResponseException ($ message , $ exception ->getResponse ()->getStatusCode ());
195+ return new ShopwareResponseException ($ message , $ exception ->getResponse ()->getStatusCode (), $ exception );
196196 }
197197
198198 return $ exception ;
You can’t perform that action at this time.
0 commit comments