1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.HTTPError = exports.ReadError = exports.RequestError = exports.JSONParseError = exports.SignatureValidationFailed = void 0;
|
4 | class SignatureValidationFailed extends Error {
|
5 | constructor(message, signature) {
|
6 | super(message);
|
7 | this.signature = signature;
|
8 | }
|
9 | }
|
10 | exports.SignatureValidationFailed = SignatureValidationFailed;
|
11 | class JSONParseError extends Error {
|
12 | constructor(message, raw) {
|
13 | super(message);
|
14 | this.raw = raw;
|
15 | }
|
16 | }
|
17 | exports.JSONParseError = JSONParseError;
|
18 | class RequestError extends Error {
|
19 | constructor(message, code, originalError) {
|
20 | super(message);
|
21 | this.code = code;
|
22 | this.originalError = originalError;
|
23 | }
|
24 | }
|
25 | exports.RequestError = RequestError;
|
26 | class ReadError extends Error {
|
27 | constructor(originalError) {
|
28 | super(originalError.message);
|
29 | this.originalError = originalError;
|
30 | }
|
31 | }
|
32 | exports.ReadError = ReadError;
|
33 | class HTTPError extends Error {
|
34 | constructor(message, statusCode, statusMessage, originalError) {
|
35 | super(message);
|
36 | this.statusCode = statusCode;
|
37 | this.statusMessage = statusMessage;
|
38 | this.originalError = originalError;
|
39 | }
|
40 | }
|
41 | exports.HTTPError = HTTPError;
|