UNPKG

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