UNPKG

1.29 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.HTTPError = exports.ReadError = exports.RequestError = exports.JSONParseError = exports.SignatureValidationFailed = void 0;
4class SignatureValidationFailed extends Error {
5 constructor(message, signature) {
6 super(message);
7 this.signature = signature;
8 }
9}
10exports.SignatureValidationFailed = SignatureValidationFailed;
11class JSONParseError extends Error {
12 constructor(message, raw) {
13 super(message);
14 this.raw = raw;
15 }
16}
17exports.JSONParseError = JSONParseError;
18class RequestError extends Error {
19 constructor(message, code, originalError) {
20 super(message);
21 this.code = code;
22 this.originalError = originalError;
23 }
24}
25exports.RequestError = RequestError;
26class ReadError extends Error {
27 constructor(originalError) {
28 super(originalError.message);
29 this.originalError = originalError;
30 }
31}
32exports.ReadError = ReadError;
33class 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}
41exports.HTTPError = HTTPError;