diff --git a/src/Common/AuthenticatedHttpClient.php b/src/Common/AuthenticatedHttpClient.php index 0caf2f5..163b48d 100644 --- a/src/Common/AuthenticatedHttpClient.php +++ b/src/Common/AuthenticatedHttpClient.php @@ -87,7 +87,7 @@ public function sendRequest($httpMethod, $resourceName, array $query = [], array ); $response = $this->basicHttpClient->sendRequest($httpMethod, $resourceName, $query, $headers, $body); } catch (AuthenticateException $exception) { - $response = []; + throw new DpdException('Error response from DPD. '.$exception->getMessage(), $exception->getCode(), $exception); } }