fix: return proper response for stale participant edit urls
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Exception;
|
||||
|
||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
|
||||
/**
|
||||
* Exception thrown when attempting to access a participant that does not exist.
|
||||
*
|
||||
* This is used for stale or tampered participant index URLs in booking flows.
|
||||
*/
|
||||
class ParticipantNotFoundException extends HttpException
|
||||
{
|
||||
public function __construct(int $index, ?\Throwable $previous = null)
|
||||
{
|
||||
$message = sprintf('Participant at index %d does not exist', $index);
|
||||
|
||||
parent::__construct(404, $message, $previous);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user