@seayoo-web/request 3.5.1 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -56
- package/dist/index.js +135 -121
- package/dist/node.js +58 -58
- package/dist/request.fetch-BNCxK4Wq.js +54 -0
- package/dist/retry-DRbCcUt8.js +646 -0
- package/dist/wx.js +58 -49
- package/package.json +1 -1
- package/types/inc/cache.d.ts +2 -2
- package/types/inc/config.d.ts +5 -5
- package/types/inc/guard.d.ts +3 -3
- package/types/inc/jsonp.d.ts +3 -2
- package/types/inc/main.d.ts +51 -34
- package/types/inc/option.d.ts +6 -7
- package/types/inc/request.xhr.d.ts +4 -4
- package/types/inc/response.d.ts +8 -3
- package/types/inc/retry.d.ts +3 -3
- package/types/inc/rule.d.ts +5 -5
- package/types/inc/sentry.d.ts +4 -4
- package/types/inc/type.d.ts +55 -50
- package/types/inc/utils.d.ts +6 -2
- package/types/index.d.ts +37 -25
- package/types/node.d.ts +26 -24
- package/types/wx.d.ts +22 -20
- package/dist/request.fetch-BHmmkAon.js +0 -48
- package/dist/retry-DodVI8cA.js +0 -627
package/dist/wx.js
CHANGED
|
@@ -1,61 +1,70 @@
|
|
|
1
|
-
import { h as
|
|
2
|
-
import { g as
|
|
3
|
-
const m = async function(
|
|
4
|
-
return
|
|
5
|
-
},
|
|
6
|
-
const
|
|
7
|
-
return
|
|
1
|
+
import { h as l, r as p, c as y, E as R, R as u, f as x, a as h, t as c, N as w } from "./retry-DRbCcUt8.js";
|
|
2
|
+
import { g as O } from "./retry-DRbCcUt8.js";
|
|
3
|
+
const m = async function(s, o, n) {
|
|
4
|
+
return l(await p(q, s, o, n), s, o, n);
|
|
5
|
+
}, q = async function(s, o, n) {
|
|
6
|
+
const t = await y(s, o, n), r = t.method;
|
|
7
|
+
return !R() || r === "PATCH" ? {
|
|
8
|
+
url: t.url,
|
|
9
|
+
method: r,
|
|
10
|
+
status: -1,
|
|
11
|
+
error: u.NotSupport,
|
|
12
|
+
statusText: u.NotSupport,
|
|
13
|
+
body: ""
|
|
14
|
+
} : new Promise((f) => {
|
|
8
15
|
wx.request({
|
|
9
|
-
url:
|
|
10
|
-
data:
|
|
11
|
-
header:
|
|
12
|
-
method:
|
|
13
|
-
dataType: "
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
url: t.url,
|
|
17
|
+
data: t.body,
|
|
18
|
+
header: t.headers,
|
|
19
|
+
method: r,
|
|
20
|
+
dataType: "raw",
|
|
21
|
+
timeout: t.timeout,
|
|
22
|
+
responseType: t.asBuffer ? "arraybuffer" : "text",
|
|
23
|
+
fail({ errMsg: e, errno: d, exception: i }) {
|
|
24
|
+
f({
|
|
25
|
+
url: t.url,
|
|
26
|
+
method: r,
|
|
19
27
|
status: -1,
|
|
20
|
-
|
|
21
|
-
|
|
28
|
+
error: u.Unknown,
|
|
29
|
+
statusText: e,
|
|
30
|
+
body: JSON.stringify({ errMsg: e, errno: d, exception: i })
|
|
22
31
|
});
|
|
23
32
|
},
|
|
24
|
-
success(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
async success(e) {
|
|
34
|
+
f(
|
|
35
|
+
await x(
|
|
36
|
+
{
|
|
37
|
+
url: t.url,
|
|
38
|
+
method: r,
|
|
39
|
+
status: e.statusCode,
|
|
40
|
+
statusText: `WxRequest${e.statusCode}`,
|
|
41
|
+
headers: { ...e.header },
|
|
42
|
+
body: null
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
asBuffer: t.asBuffer,
|
|
46
|
+
text: () => c(e.data),
|
|
47
|
+
buffer: async () => e.data instanceof ArrayBuffer ? e.data : await h(c(e.data))
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
);
|
|
33
51
|
}
|
|
34
52
|
});
|
|
35
|
-
})
|
|
36
|
-
url: u,
|
|
37
|
-
method: a,
|
|
38
|
-
status: -1,
|
|
39
|
-
statusText: d.NotSupport,
|
|
40
|
-
body: ""
|
|
41
|
-
};
|
|
53
|
+
});
|
|
42
54
|
};
|
|
43
|
-
function R(t) {
|
|
44
|
-
return typeof t == "string" ? t : t instanceof ArrayBuffer && y() ? new TextDecoder().decode(t) : JSON.stringify(t);
|
|
45
|
-
}
|
|
46
55
|
// @__NO_SIDE_EFFECTS__
|
|
47
|
-
function
|
|
48
|
-
return new
|
|
56
|
+
function b(s) {
|
|
57
|
+
return new w(m, s);
|
|
49
58
|
}
|
|
50
|
-
const
|
|
59
|
+
const a = /* @__PURE__ */ b(), T = a.setConfig, N = a.head, B = a.get, C = a.post, S = a.del, A = a.put;
|
|
51
60
|
export {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
b as NetRequest,
|
|
62
|
+
u as RequestInternalError,
|
|
63
|
+
S as del,
|
|
64
|
+
B as get,
|
|
65
|
+
O as getResponseRulesDescription,
|
|
66
|
+
N as head,
|
|
67
|
+
C as post,
|
|
68
|
+
A as put,
|
|
60
69
|
T as setGlobalConfig
|
|
61
70
|
};
|
package/package.json
CHANGED
package/types/inc/cache.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RequestCacheResolve } from "./type";
|
|
1
|
+
import { RequestCacheResolve, RequestQueryParams } from "./type";
|
|
2
2
|
/** 为 get 请求并发而设计的缓冲工具 */
|
|
3
3
|
export declare class Cache<T = unknown> {
|
|
4
4
|
private ttl;
|
|
@@ -6,7 +6,7 @@ export declare class Cache<T = unknown> {
|
|
|
6
6
|
private timer;
|
|
7
7
|
private loopCheck;
|
|
8
8
|
constructor(ttl?: number);
|
|
9
|
-
getKey(method: string, url: string, param?:
|
|
9
|
+
getKey(method: string, url: string, param?: RequestQueryParams, resolve?: RequestCacheResolve): string;
|
|
10
10
|
updateTTL(ttl: number): void;
|
|
11
11
|
get(key: string, ttl?: number): Promise<T> | null;
|
|
12
12
|
set(key: string, action: Promise<T>, ttl?: number): void;
|
package/types/inc/config.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RequestGlobalConfig } from "./type";
|
|
2
2
|
import type { SomeRequired } from "@seayoo-web/utils";
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class GlobalConfigHelper {
|
|
4
4
|
private config;
|
|
5
|
-
constructor(config?:
|
|
6
|
-
set(config: Partial<
|
|
7
|
-
get<T extends keyof
|
|
5
|
+
constructor(config?: RequestGlobalConfig);
|
|
6
|
+
set(config: Partial<RequestGlobalConfig>): void;
|
|
7
|
+
get<T extends keyof RequestGlobalConfig>(key: T): SomeRequired<RequestGlobalConfig, "timeout" | "credentials" | "baseURL" | "maxRetry" | "cacheTTL" | "responseRule" | "retryInterval" | "retryResolve" | "defaultTypeGuardMessage">[T];
|
|
8
8
|
/** 基于 baseURL 返回完整的 url 地址 */
|
|
9
9
|
getFullUrl(url: string): string;
|
|
10
10
|
/** 提示消息 */
|
package/types/inc/guard.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
export declare function
|
|
1
|
+
import type { GlobalConfigHelper } from "./config";
|
|
2
|
+
import type { ResponseResult, DataGuard } from "./type";
|
|
3
|
+
export declare function withGuard<T>(url: string, result: ResponseResult, config: GlobalConfigHelper, dataGuard: DataGuard<T> | null): ResponseResult<T | null | unknown>;
|
package/types/inc/jsonp.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { RequestQueryParams } from "./type";
|
|
1
2
|
import type { TypeGuardFn } from "@seayoo-web/utils";
|
|
2
3
|
/**
|
|
3
4
|
* 以 script 方式加载远程资源,资源通过回调函数接收,强制进行类型校验
|
|
4
5
|
*/
|
|
5
|
-
export declare function jsonp<T>(url: string, typeGuard: TypeGuardFn<T>, params?:
|
|
6
|
+
export declare function jsonp<T>(url: string, typeGuard: TypeGuardFn<T>, params?: RequestQueryParams): Promise<T | null>;
|
|
6
7
|
/**
|
|
7
8
|
* 以 script 方式加载远程资源,资源通过全局变量接收,强制进行类型校验
|
|
8
9
|
*/
|
|
9
|
-
export declare function jsonx<T>(url: string, typeGuard: TypeGuardFn<T>, params?:
|
|
10
|
+
export declare function jsonx<T>(url: string, typeGuard: TypeGuardFn<T>, params?: RequestQueryParams): Promise<T | null>;
|
package/types/inc/main.d.ts
CHANGED
|
@@ -1,63 +1,80 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
type RequestBody = NonNullable<
|
|
1
|
+
import type { DataGuard, RequestOptions, RequestGlobalConfig, ResponseResult, NetRequestAgent, ResponseWithType, ResponseWithoutType, RequestQueryParams } from "./type";
|
|
2
|
+
type RequestBody = NonNullable<RequestOptions["body"]>;
|
|
3
|
+
export type URLPlus = string | {
|
|
4
|
+
url: string;
|
|
5
|
+
params: RequestQueryParams;
|
|
6
|
+
};
|
|
7
|
+
export type BufferRequestOptions = RequestOptions & {
|
|
8
|
+
asBuffer: true;
|
|
9
|
+
};
|
|
3
10
|
/** 工具函数主类 */
|
|
4
11
|
export declare class NetRequestHandler {
|
|
5
12
|
private agent;
|
|
6
13
|
private config;
|
|
7
14
|
private cache;
|
|
8
|
-
constructor(agent: NetRequestAgent, config?:
|
|
15
|
+
constructor(agent: NetRequestAgent, config?: RequestGlobalConfig);
|
|
16
|
+
/** 发送网络请求,含有缓存控制逻辑,不含有 guard 逻辑 */
|
|
17
|
+
private send;
|
|
9
18
|
/**
|
|
10
|
-
*
|
|
19
|
+
* 发送一个网络请求,method 默认是 `GET`。推荐使用包装函数,如 `get` / `post` 等
|
|
11
20
|
*/
|
|
12
|
-
request(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
21
|
+
request(op: {
|
|
22
|
+
url: string;
|
|
23
|
+
options?: RequestOptions;
|
|
24
|
+
}): Promise<ResponseResult<unknown>>;
|
|
25
|
+
request<T>(op: {
|
|
26
|
+
url: string;
|
|
27
|
+
options?: RequestOptions;
|
|
28
|
+
guard: DataGuard<T>;
|
|
29
|
+
}): Promise<ResponseResult<T>>;
|
|
30
|
+
/** 整理合并通用参数 */
|
|
31
|
+
private gen;
|
|
17
32
|
/**
|
|
18
33
|
* 修改默认请求配置: baseURL / timeout / credentials / errorHandler / messageHandler / responseHandler / logHandler / responseRule
|
|
19
34
|
*/
|
|
20
|
-
setConfig(config:
|
|
35
|
+
setConfig(config: RequestGlobalConfig): void;
|
|
21
36
|
/**
|
|
22
37
|
* 读取默认的请求配置
|
|
23
38
|
*/
|
|
24
|
-
getConfig<T extends keyof
|
|
39
|
+
getConfig<T extends keyof RequestGlobalConfig>(key: T): import("@seayoo-web/utils").SomeRequired<RequestGlobalConfig, "timeout" | "credentials" | "baseURL" | "maxRetry" | "cacheTTL" | "responseRule" | "retryInterval" | "retryResolve" | "defaultTypeGuardMessage">[T];
|
|
25
40
|
/**
|
|
26
41
|
* 发送一个 HEAD 请求,并且不处理响应 body
|
|
27
42
|
*/
|
|
28
|
-
head(url: string, options?:
|
|
43
|
+
head(url: string, params?: RequestQueryParams | null, options?: Omit<RequestOptions, "asBuffer">): ResponseWithoutType;
|
|
29
44
|
/**
|
|
30
45
|
* 发送一个 GET 请求,请求自带 500ms 缓冲控制以应对并发场景
|
|
31
46
|
*/
|
|
32
|
-
get(url: string): ResponseWithoutType;
|
|
33
|
-
get(url: string,
|
|
34
|
-
get
|
|
47
|
+
get(url: string, params?: RequestQueryParams): ResponseWithoutType;
|
|
48
|
+
get(url: string, params: RequestQueryParams | null, guard: null, options: BufferRequestOptions): ResponseWithType<ArrayBuffer>;
|
|
49
|
+
get(url: string, params: RequestQueryParams | null, guard: null, options?: RequestOptions): ResponseWithoutType;
|
|
50
|
+
get<T>(url: string, params: RequestQueryParams | null, guard: DataGuard<T>, options?: RequestOptions): ResponseWithType<T>;
|
|
35
51
|
/**
|
|
36
|
-
* 发送一个 POST
|
|
52
|
+
* 发送一个 POST 请求
|
|
37
53
|
*/
|
|
38
|
-
post(url:
|
|
39
|
-
post(url:
|
|
40
|
-
post(url:
|
|
41
|
-
post<T>(url:
|
|
54
|
+
post(url: URLPlus, data?: RequestBody): ResponseWithoutType;
|
|
55
|
+
post(url: URLPlus, body: RequestBody, guard: null, options: BufferRequestOptions): ResponseWithType<ArrayBuffer>;
|
|
56
|
+
post(url: URLPlus, body: RequestBody, guard: null, options?: RequestOptions): ResponseWithoutType;
|
|
57
|
+
post<T>(url: URLPlus, body: RequestBody, guard: DataGuard<T>, options?: RequestOptions): ResponseWithType<T>;
|
|
42
58
|
/**
|
|
43
|
-
* 发送一个 DELETE
|
|
59
|
+
* 发送一个 DELETE 请求
|
|
44
60
|
*/
|
|
45
|
-
del(url: string): ResponseWithoutType;
|
|
46
|
-
del(url: string,
|
|
47
|
-
del
|
|
61
|
+
del(url: string, params?: RequestQueryParams): ResponseWithoutType;
|
|
62
|
+
del(url: string, params: RequestQueryParams | null, guard: null, options: BufferRequestOptions): ResponseWithType<ArrayBuffer>;
|
|
63
|
+
del(url: string, params: RequestQueryParams | null, guard: null, options?: RequestOptions): ResponseWithoutType;
|
|
64
|
+
del<T>(url: string, params: RequestQueryParams | null, guard: DataGuard<T>, options?: RequestOptions): ResponseWithType<T>;
|
|
48
65
|
/**
|
|
49
|
-
* 发送一个 PUT
|
|
66
|
+
* 发送一个 PUT 请求
|
|
50
67
|
*/
|
|
51
|
-
put(url:
|
|
52
|
-
put(url:
|
|
53
|
-
put(url:
|
|
54
|
-
put<T>(url:
|
|
68
|
+
put(url: URLPlus, body?: RequestBody): ResponseWithoutType;
|
|
69
|
+
put(url: URLPlus, body: RequestBody, guard: null, options: BufferRequestOptions): ResponseWithType<ArrayBuffer>;
|
|
70
|
+
put(url: URLPlus, body: RequestBody, guard: null, options?: RequestOptions): ResponseWithoutType;
|
|
71
|
+
put<T>(url: URLPlus, body: RequestBody, guard: DataGuard<T>, options?: RequestOptions): ResponseWithType<T>;
|
|
55
72
|
/**
|
|
56
|
-
* 发送一个 PATCH
|
|
73
|
+
* 发送一个 PATCH 请求
|
|
57
74
|
*/
|
|
58
|
-
patch(url:
|
|
59
|
-
patch(url:
|
|
60
|
-
patch(url:
|
|
61
|
-
patch<T>(url:
|
|
75
|
+
patch(url: URLPlus, data?: RequestBody): ResponseWithoutType;
|
|
76
|
+
patch(url: URLPlus, body: RequestBody, guard: null, options: BufferRequestOptions): ResponseWithType<ArrayBuffer>;
|
|
77
|
+
patch(url: URLPlus, body: RequestBody, guard: null, options?: RequestOptions): ResponseWithoutType;
|
|
78
|
+
patch<T>(url: URLPlus, body: RequestBody, guard: DataGuard<T>, options?: RequestOptions): ResponseWithType<T>;
|
|
62
79
|
}
|
|
63
80
|
export {};
|
package/types/inc/option.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
type FixedRequestOptions = Omit<Required<
|
|
1
|
+
import type { GlobalConfigHelper } from "./config";
|
|
2
|
+
import type { BaseRequestOptions, BaseRequestBody } from "./type";
|
|
3
|
+
type FixedRequestOptions = Omit<Required<BaseRequestOptions>, "params" | "body" | "abort"> & {
|
|
4
4
|
url: string;
|
|
5
|
-
|
|
6
|
-
abort?: IBaseRequestOptions["abort"];
|
|
5
|
+
abort?: BaseRequestOptions["abort"];
|
|
7
6
|
body: ReturnType<typeof convertBody>;
|
|
8
7
|
};
|
|
9
|
-
export declare function convertOptions(url: string, config:
|
|
10
|
-
declare function convertBody(body:
|
|
8
|
+
export declare function convertOptions(url: string, config: GlobalConfigHelper, options?: BaseRequestOptions): Promise<FixedRequestOptions>;
|
|
9
|
+
declare function convertBody(body: BaseRequestOptions["body"]): BaseRequestBody | undefined;
|
|
11
10
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { NetRequestAgent,
|
|
1
|
+
import type { NetRequestAgent, RequestGlobalConfig, RequestOptions, ResponseResult, RetryRequestOptions, BaseRequestOptions } from "./type";
|
|
2
2
|
/** 进度回调函数配置 */
|
|
3
|
-
interface XHRequestOptions extends
|
|
3
|
+
interface XHRequestOptions extends BaseRequestOptions {
|
|
4
4
|
onUploadProgress?: (progress: {
|
|
5
5
|
total: number;
|
|
6
6
|
loaded: number;
|
|
@@ -15,10 +15,10 @@ export declare const xhRequest: NetRequestAgent;
|
|
|
15
15
|
/**
|
|
16
16
|
* 上传文件,支持进度信息和多文件上传,不抛错,限制在浏览器中使用,不支持重试
|
|
17
17
|
*/
|
|
18
|
-
export declare function xhrUpload(url: string, files: Record<string, Blob> | Blob, options?: Omit<
|
|
18
|
+
export declare function xhrUpload(url: string, files: Record<string, Blob> | Blob, options?: Omit<RequestOptions, keyof XHRequestOptions | keyof RetryRequestOptions> & Omit<XHRequestOptions, "body" | "method"> & {
|
|
19
19
|
body?: Record<string, unknown>;
|
|
20
20
|
method?: "POST" | "PUT";
|
|
21
21
|
},
|
|
22
22
|
/** 全局配置中独有的配置,以受全局配置控制 */
|
|
23
|
-
config?: Omit<
|
|
23
|
+
config?: Omit<RequestGlobalConfig, keyof RequestOptions>): Promise<ResponseResult>;
|
|
24
24
|
export {};
|
package/types/inc/response.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
export declare function
|
|
1
|
+
import type { GlobalConfigHelper } from "./config";
|
|
2
|
+
import type { RequestOptions, ResponseResult, RequestBaseResponse } from "./type";
|
|
3
|
+
export declare function formatResponse(baseResult: RequestBaseResponse, options: {
|
|
4
|
+
asBuffer?: boolean;
|
|
5
|
+
text: () => Promise<string> | string;
|
|
6
|
+
buffer: () => Promise<ArrayBuffer> | ArrayBuffer;
|
|
7
|
+
}): Promise<RequestBaseResponse>;
|
|
8
|
+
export declare function handleResponse(res: RequestBaseResponse, url: string, config: GlobalConfigHelper, options?: RequestOptions): ResponseResult;
|
package/types/inc/retry.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { NetRequestCoreFn,
|
|
3
|
-
export declare function retryRequest(agent: NetRequestCoreFn, url: string, config:
|
|
1
|
+
import type { GlobalConfigHelper } from "./config";
|
|
2
|
+
import type { NetRequestCoreFn, RequestOptions } from "./type";
|
|
3
|
+
export declare function retryRequest(agent: NetRequestCoreFn, url: string, config: GlobalConfigHelper, options?: RequestOptions, _try?: number): ReturnType<NetRequestCoreFn>;
|
package/types/inc/rule.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
type ResponseInfo = Pick<
|
|
1
|
+
import type { ResponseResult, ResponseRule, RequestBaseResponse } from "./type";
|
|
2
|
+
type ResponseInfo = Pick<ResponseResult, "ok" | "code" | "data" | "message">;
|
|
3
3
|
/**
|
|
4
4
|
* 分析响应内容中的错误信息和数据
|
|
5
5
|
*/
|
|
6
|
-
export declare function analysesResponse(
|
|
6
|
+
export declare function analysesResponse(res: RequestBaseResponse, globalRule: ResponseRule, rule?: ResponseRule): ResponseInfo;
|
|
7
|
+
export declare function statusOK(status: number): boolean;
|
|
7
8
|
/**
|
|
8
9
|
* 将 Response Rules 转化成为自然描述语言
|
|
9
10
|
*/
|
|
10
|
-
export declare const getResponseRulesDescription: (rules:
|
|
11
|
-
export declare function statusOK(status: number): boolean;
|
|
11
|
+
export declare const getResponseRulesDescription: (rules: ResponseRule) => string;
|
|
12
12
|
export {};
|
package/types/inc/sentry.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { ERequestRawError,
|
|
1
|
+
import type { ERequestRawError, RequestGlobalConfig, ResponseBody } from "./type";
|
|
2
2
|
/** 根据响应组织整理 sentry 上报信息 */
|
|
3
3
|
export declare function getSentryExceptionData(data: {
|
|
4
4
|
url: string;
|
|
5
5
|
status: number;
|
|
6
|
-
code: string;
|
|
7
6
|
method: string;
|
|
7
|
+
code: string;
|
|
8
8
|
message: string;
|
|
9
|
-
body:
|
|
9
|
+
body: ResponseBody;
|
|
10
10
|
headers: Record<string, string>;
|
|
11
11
|
error?: ERequestRawError;
|
|
12
|
-
}): Pick<Parameters<NonNullable<
|
|
12
|
+
}): Pick<Parameters<NonNullable<RequestGlobalConfig["errorHandler"]>>[0], "sentryError" | "sentryTags" | "sentryExtra">;
|