fix: simplify trait to address incorrect arguments
This commit is contained in:
@@ -76,13 +76,13 @@ class Step3Controller extends AbstractController
|
||||
$inquiryResponse = $this->apiClient->createBookingInquiry($bookingCreateDto);
|
||||
|
||||
if ($inquiryResponse instanceof Notification) {
|
||||
return $this->handleApiError(
|
||||
$this->handleApiError(
|
||||
'Booking inquiry failed',
|
||||
['message' => $inquiryResponse->message],
|
||||
$inquiryResponse->message ?? 'Ein Fehler ist aufgetreten. Bitte versuche es erneut oder wende dich an den Kundenservice.',
|
||||
$bookingCreateDto,
|
||||
$form
|
||||
);
|
||||
|
||||
return $this->renderStepForm($bookingCreateDto, $form);
|
||||
}
|
||||
|
||||
if (false === $inquiryResponse->isInquiryValid()) {
|
||||
@@ -109,13 +109,13 @@ class Step3Controller extends AbstractController
|
||||
$errorMessage .= ' '.$inquiryResponse->message;
|
||||
}
|
||||
|
||||
return $this->handleApiError(
|
||||
$this->handleApiError(
|
||||
'Booking inquiry validation failed',
|
||||
['status' => $inquiryResponse->status, 'message' => $inquiryResponse->message],
|
||||
$errorMessage,
|
||||
$bookingCreateDto,
|
||||
$form
|
||||
);
|
||||
|
||||
return $this->renderStepForm($bookingCreateDto, $form);
|
||||
}
|
||||
|
||||
// Validate price match (rounded to cent precision to avoid floating-point errors)
|
||||
@@ -133,7 +133,7 @@ class Step3Controller extends AbstractController
|
||||
$diagnostics = $this->priceMismatchDiagnostics->buildDiagnostics($bookingCreateDto, $inquiryResponse);
|
||||
$deltaBreakdown = $diagnostics['deltaBreakdown'] ?? [];
|
||||
|
||||
return $this->handleApiError(
|
||||
$this->handleApiError(
|
||||
'Price mismatch detected - payload incomplete',
|
||||
[
|
||||
'apiTotal' => $apiTotal,
|
||||
@@ -149,9 +149,9 @@ class Step3Controller extends AbstractController
|
||||
'diagnostics' => $diagnostics,
|
||||
],
|
||||
'Preisabweichung festgestellt. Bitte wende dich an den Kundenservice.',
|
||||
$bookingCreateDto,
|
||||
$form
|
||||
);
|
||||
|
||||
return $this->renderStepForm($bookingCreateDto, $form);
|
||||
}
|
||||
|
||||
// Validation successful - proceed to confirmation step
|
||||
@@ -164,28 +164,26 @@ class Step3Controller extends AbstractController
|
||||
|
||||
return $this->redirectToRoute('app_booking_create_step_4');
|
||||
} catch (TimeoutException $e) {
|
||||
return $this->handleApiError(
|
||||
$this->handleApiError(
|
||||
'Booking inquiry timeout',
|
||||
[
|
||||
'exception' => $e->getMessage(),
|
||||
'trace' => $e->getTraceAsString(),
|
||||
],
|
||||
'Die Anfrage hat zu lange gedauert. Bitte versuche es erneut oder wende dich an den Kundenservice.',
|
||||
$bookingCreateDto,
|
||||
$form
|
||||
);
|
||||
} catch (\Exception $e) {
|
||||
return $this->handleApiError(
|
||||
$this->handleApiError(
|
||||
'Booking inquiry exception',
|
||||
[
|
||||
'exception' => $e->getMessage(),
|
||||
'trace' => $e->getTraceAsString(),
|
||||
],
|
||||
'Ein allgemeiner Fehler ist aufgetreten. Bitte wende dich an den Kundenservice.',
|
||||
$bookingCreateDto,
|
||||
$form
|
||||
);
|
||||
}
|
||||
|
||||
return $this->renderStepForm($bookingCreateDto, $form);
|
||||
}
|
||||
|
||||
return $this->renderStepForm($bookingCreateDto, $form);
|
||||
|
||||
Reference in New Issue
Block a user