exceptions.js
1.26 KB
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
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HTTPError = exports.ReadError = exports.RequestError = exports.JSONParseError = exports.SignatureValidationFailed = void 0;
class SignatureValidationFailed extends Error {
constructor(message, signature) {
super(message);
this.signature = signature;
}
}
exports.SignatureValidationFailed = SignatureValidationFailed;
class JSONParseError extends Error {
constructor(message, raw) {
super(message);
this.raw = raw;
}
}
exports.JSONParseError = JSONParseError;
class RequestError extends Error {
constructor(message, code, originalError) {
super(message);
this.code = code;
this.originalError = originalError;
}
}
exports.RequestError = RequestError;
class ReadError extends Error {
constructor(originalError) {
super(originalError.message);
this.originalError = originalError;
}
}
exports.ReadError = ReadError;
class HTTPError extends Error {
constructor(message, statusCode, statusMessage, originalError) {
super(message);
this.statusCode = statusCode;
this.statusMessage = statusMessage;
this.originalError = originalError;
}
}
exports.HTTPError = HTTPError;