UNPKG

poe-api-manager

Version:
30 lines (29 loc) 932 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const CustomError_1 = __importDefault(require("./CustomError")); /** * Represents an API error with a message, status code, and additional details. * @class * @extends {CustomError} */ class ApiError extends CustomError_1.default { /** * The additional details of the error. * @type {any} */ details; /** * Creates a new instance of ApiError. * @param {string} message - The error message. * @param {number} statusCode - The HTTP status code. * @param {any} details - The additional details of the error. */ constructor(message, statusCode, details) { super(message, statusCode); this.details = details; } } exports.default = ApiError;