fix: correctly instantiate exception and log error

This commit is contained in:
Björn Fromme committed 2025-04-11 08:45:18 +02:00
1 parent af4ba42b56
commit 4846d50148
2 files changed
+4 -2

No files matched your search

+3 -1
View File
@@ -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