UNPKG

fnbr

Version:

A library to interact with Epic Games' Fortnite HTTP and XMPP services

27 lines 1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Represents an HTTP error from the Epicgames API */ class EpicgamesAPIError extends Error { /** * @param error The raw Epicgames API error data * @param request The client's request * @param status The response's HTTP status */ constructor(error, request, status) { var _a; super(); this.name = 'EpicgamesAPIError'; this.message = error.errorMessage; this.method = ((_a = request.method) === null || _a === void 0 ? void 0 : _a.toUpperCase()) || 'GET'; this.url = request.url || ''; this.code = error.errorCode; this.numericCode = typeof error.numericErrorCode === 'number' ? error.numericErrorCode : null; this.messageVars = error.messageVars || []; this.httpStatus = status; this.requestData = request.data; } } exports.default = EpicgamesAPIError; //# sourceMappingURL=EpicgamesAPIError.js.map