1 | type Message = string;
|
2 | interface Status {
|
3 | status: number;
|
4 | statusText: string;
|
5 | }
|
6 | interface ErrorDetails {
|
7 | signature?: string;
|
8 | raw?: any;
|
9 | }
|
10 | interface FetchErrorDetails extends Status {
|
11 | headers: Headers;
|
12 | body: string;
|
13 | }
|
14 | interface AxiosErrorDetails {
|
15 | originalError: Error;
|
16 | code?: string;
|
17 | statusCode?: number;
|
18 | statusMessage?: string;
|
19 | }
|
20 | export declare class SignatureValidationFailed extends Error {
|
21 | signature?: string;
|
22 | constructor(message: Message, { signature }?: ErrorDetails);
|
23 | }
|
24 | export declare class JSONParseError extends Error {
|
25 | raw: any;
|
26 | constructor(message: Message, { raw }?: ErrorDetails);
|
27 | }
|
28 | export declare class RequestError extends Error {
|
29 | code: string;
|
30 | private originalError;
|
31 | constructor(message: Message, { code, originalError }: AxiosErrorDetails);
|
32 | }
|
33 | export declare class ReadError extends Error {
|
34 | originalError: Error;
|
35 | constructor(message: Message, { originalError }: AxiosErrorDetails);
|
36 | }
|
37 | export declare class HTTPError extends Error {
|
38 | statusCode: number;
|
39 | statusMessage: string;
|
40 | originalError: any;
|
41 | constructor(message: Message, { statusCode, statusMessage, originalError }: AxiosErrorDetails);
|
42 | }
|
43 | export declare class HTTPFetchError extends Error {
|
44 | status: number;
|
45 | statusText: string;
|
46 | headers: Headers;
|
47 | body: string;
|
48 | constructor(message: Message, { status, statusText, headers, body }: FetchErrorDetails);
|
49 | }
|
50 | export {};
|
51 |
|
\ | No newline at end of file |