fix: correctly instantiate exception and log error
This commit is contained in:
@@ -323,9 +323,11 @@ class ApiClient
|
||||
$this->dumpXmlToFile('response', $requestId, $xml);
|
||||
}
|
||||
|
||||
throw new ApiClientException('Unexpected response received from API', [
|
||||
$this->logger->error('Unexpected response received from API', [
|
||||
'request_id' => $requestId,
|
||||
]);
|
||||
|
||||
throw new ApiClientException('Unexpected response received from API');
|
||||
}
|
||||
|
||||
private function dumpXmlToFile(string $type, string $requestId, string $body): void
|
||||
|
||||
@@ -4,4 +4,4 @@ namespace App\BusProNet\Exception;
|
||||
|
||||
class ApiClientException extends \Exception
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user