fix: pass logger explicitly to BookingCreateTrait::handleApiError

This commit is contained in:
Björn Fromme
2026-04-16 13:34:54 +02:00
parent 4d86629315
commit 132329361f
3 changed files with 12 additions and 1 deletions
@@ -80,6 +80,7 @@ class Step3Controller extends AbstractController
if ($inquiryResponse instanceof Notification) {
$this->handleApiError(
$this->logger,
'Booking inquiry failed',
['message' => $inquiryResponse->message],
$inquiryResponse->message ?? 'Ein Fehler ist aufgetreten. Bitte versuche es erneut oder wende dich an den Kundenservice.',
@@ -113,6 +114,7 @@ class Step3Controller extends AbstractController
}
$this->handleApiError(
$this->logger,
'Booking inquiry validation failed',
['status' => $inquiryResponse->status, 'message' => $inquiryResponse->message],
$errorMessage,
@@ -137,6 +139,7 @@ class Step3Controller extends AbstractController
$deltaBreakdown = $diagnostics['deltaBreakdown'] ?? [];
$this->handleApiError(
$this->logger,
'Price mismatch detected - payload incomplete',
[
'apiTotal' => $apiTotal,
@@ -168,6 +171,7 @@ class Step3Controller extends AbstractController
return $this->redirectToRoute('app_booking_create_step_4');
} catch (TimeoutException $e) {
$this->handleApiError(
$this->logger,
'Booking inquiry timeout',
[
'exception' => $e->getMessage(),
@@ -177,6 +181,7 @@ class Step3Controller extends AbstractController
);
} catch (\Exception $e) {
$this->handleApiError(
$this->logger,
'Booking inquiry exception',
[
'exception' => $e->getMessage(),