feat: improved error handling of xml parsers and loaders
This commit is contained in:
1 parent
0f6b73340e
commit
4f02529b15
9 files changed
+257
-42
No files matched your search
@@ -36,8 +36,6 @@ class CreateStep1Controller extends AbstractController
|
||||
try {
|
||||
$bookingCreateDto = $this->bookingService->getOrCreateBookingCreateDto($request);
|
||||
} catch (NoRoomsAvailableException $e) {
|
||||
$this->addFlash('error', 'Leider sind für diese Reise aktuell keine Zimmer verfügbar.');
|
||||
// TODO: Redirect to travel listing or hotel details page
|
||||
throw $this->createNotFoundException('No rooms available for this travel.');
|
||||
}
|
||||
|
||||
@@ -93,8 +91,7 @@ class CreateStep1Controller extends AbstractController
|
||||
try {
|
||||
$bookingCreateDto = $this->bookingService->getOrCreateBookingCreateDto($request);
|
||||
} catch (NoRoomsAvailableException $e) {
|
||||
// For HTMX requests, return a simple error message
|
||||
return new Response('<div class="text-red-700 p-4">Keine Zimmer verfügbar</div>', 400);
|
||||
throw $this->createNotFoundException('No rooms available for this travel.');
|
||||
}
|
||||
|
||||
// Process the form to update the DTO with the latest room selection
|
||||
|
||||
Reference in new issue
Block a user