feat: improved error handling in controllers, cleanup

This commit is contained in:
Björn Fromme
2025-09-26 09:00:40 +02:00
parent 391dd63ebf
commit 122df1a3f5
11 changed files with 261 additions and 119 deletions
@@ -0,0 +1,23 @@
<?php
declare(strict_types=1);
namespace App\Exception;
use Symfony\Component\HttpKernel\Exception\HttpException;
/**
* Exception thrown when attempting to access booking steps without a valid session.
*
* This exception is used when step controllers are accessed without going through
* the proper initialization flow or when the booking session has expired.
*/
class BookingSessionNotFoundException extends HttpException
{
public function __construct(?\Throwable $previous = null)
{
$message = 'No valid booking session found. Please start a new booking.';
parent::__construct(404, $message, $previous);
}
}