UNPKG

twisted-axios

Version:
21 lines (20 loc) 650 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GenericError = void 0; const message = 'Generic error'; /** * Not api key found */ class GenericError extends Error { constructor(rateLimits, error) { var _a; super(error.message || message); this.name = 'GenericError'; this.status = error.response.status; this.body = ((_a = error.response) === null || _a === void 0 ? void 0 : _a.data) || null; this.rateLimits = rateLimits; this.error = error; Object.setPrototypeOf(this, GenericError.prototype); } } exports.GenericError = GenericError;