Files
portal/app/app/Services/Auth/RegistrationException.php
T

22 lines
562 B
PHP

<?php
declare(strict_types=1);
namespace App\Services\Auth;
use RuntimeException;
/**
* Доменная ошибка самозаписи. reason — машинный код для ответа контроллера:
* email_taken | captcha_failed | not_found | expired | too_many_attempts | invalid_code.
*/
final class RegistrationException extends RuntimeException
{
public function __construct(
public readonly string $reason,
public readonly ?int $attemptsRemaining = null,
) {
parent::__construct($reason);
}
}