exceptions.ts
800 Bytes
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
export class SignatureValidationFailed extends Error {
constructor(message: string, public signature?: string) {
super(message);
}
}
export class JSONParseError extends Error {
constructor(message: string, public raw: any) {
super(message);
}
}
export class RequestError extends Error {
constructor(
message: string,
public code: string,
private originalError: Error,
) {
super(message);
}
}
export class ReadError extends Error {
constructor(private originalError: Error) {
super(originalError.message);
}
}
export class HTTPError extends Error {
constructor(
message: string,
public statusCode: number,
public statusMessage: string,
public originalError: any,
) {
super(message);
}
}