feat: improved error handling in controllers, cleanup
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user