Interface ApiFailureResponse<T>

API 失败响应

interface ApiFailureResponse<T = any> {
    data: T & { error: string; success: false };
    headers: Headers;
    ok: boolean;
    redirected: boolean;
    status: number;
    statusText: string;
    type: ResponseType;
    url: string;
}

Type Parameters

  • T = any

    响应数据

Hierarchy

  • ResponseMeta
    • ApiFailureResponse

Properties

data: T & { error: string; success: false }

Type declaration

  • error: string

    错误信息

  • success: false

    是否请求成功

headers: Headers
ok: boolean
redirected: boolean
status: number
statusText: string
type: ResponseType
url: string