@thallo/global-error
v0.0.5
Published
> yarn add @thallo/global-error
Downloads
4
Readme
thallo-api-signature
yarn add @thallo/global-error
Usage
import globalError from "@thallo/global-error";
const { type , error } = globalError(error)
Types
type errorType = "401" | "403" | "500" | "retry" | "system" | "timeout" | undefined;
"401" - JWT认证失败
"403" - 访问权限/服务权限/操作权限被禁止
"500" - 服务器/后端连接/后端解析错误
"retry" - 请求头参数过期/限流/后端请求超时/网关请求超时
"system" - 请求非法/请求头计算错误/订购过期/服务器配置错误
"timeout" - 请求超时
type error = ResponseError | {}