简体中文
Home > SYS_ApiError > (constructor)
SYS_ApiError.(constructor)
创建扩展 API 错误
签名
typescript
function constructor(code: ESYS_ApiErrorCode, message?: string, details?: Record<string, unknown>);1
参数名
参数 | 类型 | 描述 |
|---|---|---|
code | 错误码 | |
message | string | (可选) 错误描述,默认与错误码一致 |
details | Record<string, unknown> | (可选) 错误上下文 |