forked from request/request-promise-native
-
Notifications
You must be signed in to change notification settings - Fork 0
/
errors.d.ts
58 lines (55 loc) · 1.41 KB
/
errors.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import rp from "./index";
export interface RequestError extends Error {
cause: any;
error: any;
options: rp.Options;
response: rp.FullResponse;
}
export interface RequestErrorConstructor {
new (
cause: any,
options: rp.Options,
response: rp.FullResponse
): RequestError;
(cause: any, options: rp.Options, response: rp.FullResponse): RequestError;
prototype: RequestError;
}
export const RequestError: RequestErrorConstructor;
export interface StatusCodeError extends Error {
statusCode: number;
error: any;
options: rp.Options;
response: rp.FullResponse;
}
export interface StatusCodeErrorConstructor extends Error {
new (
statusCode: number,
body: any,
options: rp.Options,
response: rp.FullResponse
): StatusCodeError;
(
statusCode: number,
body: any,
options: rp.Options,
response: rp.FullResponse
): StatusCodeError;
prototype: StatusCodeError;
}
export const StatusCodeError: StatusCodeErrorConstructor;
export interface TransformError extends Error {
cause: any;
error: any;
options: rp.Options;
response: rp.FullResponse;
}
export interface TransformErrorConstructor extends Error {
new (
cause: any,
options: rp.Options,
response: rp.FullResponse
): TransformError;
(cause: any, options: rp.Options, response: rp.FullResponse): TransformError;
prototype: TransformError;
}
export const TransformError: TransformErrorConstructor;