Skip to content

Commit 2118bf9

Browse files
author
Frederik Schmitt
committed
fix: catch ShopwareResponseException
1 parent 58f3cf8 commit 2118bf9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Client/AdminAuthenticator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use Vin\ShopwareSdk\Data\AccessToken;
1414
use Vin\ShopwareSdk\Data\EndPointTrait;
1515
use Vin\ShopwareSdk\Exception\AuthorizationFailedException;
16+
use Vin\ShopwareSdk\Exception\ShopwareResponseException;
1617
use Vin\ShopwareSdk\Exception\ShopwareUnreachableException;
1718

1819
class 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(),

0 commit comments

Comments
 (0)