24 lines
621 B
PHP
24 lines
621 B
PHP
<?php
|
||
|
||
namespace App\Exceptions;
|
||
|
||
use RuntimeException;
|
||
use App\Lottery\ErrorCode;
|
||
|
||
/**
|
||
* 玩家端 Bearer 鉴权失败时抛出,由 EnsurePlayerApi 捕获并转为 JSON。
|
||
*
|
||
* @property-read int $lotteryCode 业务错误码({@see ErrorCode})
|
||
* @property-read int $httpStatus HTTP 状态码(401 未授权、503 服务未配置等)
|
||
*/
|
||
final class PlayerAuthenticationException extends RuntimeException
|
||
{
|
||
public function __construct(
|
||
string $message,
|
||
public readonly int $lotteryCode,
|
||
public readonly int $httpStatus = 401,
|
||
) {
|
||
parent::__construct($message);
|
||
}
|
||
}
|