UNPKG

trade360-nodejs-sdk

Version:

LSports Trade360 SDK for Node.js

16 lines (15 loc) 836 B
import { BaseError } from './base.error'; export declare class HttpResponseError extends BaseError { constructor(extraMessage: string, args?: Record<string, unknown>); private static HttpErrorStatusMapping; /** * Creates an instance of HttpResponseError based on the httpStatusCode. * @param httpStatusCode The status code of the HTTP response * @param rawErrorResponse The raw error response * @param statusText The status text of the HTTP response * @param message error message * @returns HttpResponseError instance based on the httpStatusCode provided * or a generic error message if the httpStatusCode is not handled. */ static getHttpResponseErrorByStatusCode(httpStatusCode?: number, rawErrorResponse?: string, statusText?: string, message?: string): HttpResponseError; }