fix: show actual error message
This commit is contained in:
@@ -106,7 +106,9 @@ class IndexController extends AbstractController
|
|||||||
|
|
||||||
// Redirect to login page (optional authentication before Step 1)
|
// Redirect to login page (optional authentication before Step 1)
|
||||||
return $this->htmxRedirect($request, $this->generateUrl('app_login'));
|
return $this->htmxRedirect($request, $this->generateUrl('app_login'));
|
||||||
} catch (TravelNotFoundException|HotelNotFoundException|HotelNotInTravelException|NoRoomsAvailableException) {
|
} catch (TravelNotFoundException|HotelNotFoundException|HotelNotInTravelException|NoRoomsAvailableException $e) {
|
||||||
|
$this->addFlash('error', $e->getMessage());
|
||||||
|
|
||||||
return $this->htmxRedirect($request, $this->generateUrl('app_booking_create_error'));
|
return $this->htmxRedirect($request, $this->generateUrl('app_booking_create_error'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user