Files
lotteryLaravel/app/Lottery/ErrorCode.php

26 lines
738 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace App\Lottery;
/**
* HTTP JSON 中与 `ApiResponse` 对齐的业务码常量(对齐 docs/04 §10
* SSO 等特殊场景仍由各模块直接写整数(如 EnsurePlayerApi 使用的 8001
*/
enum ErrorCode: int
{
/** 表单 / Query 校验失败(见 ValidationException → 422 */
case ValidationFailed = 9001;
/** 资源或路由不存在 */
case NotFound = 9004;
/** 请求过于频繁 */
case TooManyRequests = 9031;
/** `abort(4xx)` 等客户端类 Http 异常HTTP 状态码见响应头;本码作业务归类) */
case ClientHttpError = 9010;
/** 未分类服务端异常(生产环境不向客户端暴露细节) */
case InternalError = 9999;
}