@thallo/global-error
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

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 | {}

Dependencies (0)

    Dev Dependencies (13)

    Package Sidebar

    Install

    npm i @thallo/global-error

    Weekly Downloads

    6

    Version

    0.0.5

    License

    MIT

    Unpacked Size

    16.8 kB

    Total Files

    10

    Last publish

    Collaborators

    • kettyy.
    • sound_shell
    • yanghuan.npm