UNPKG

reduct-js

Version:

ReductStore Client SDK for Javascript/NodeJS/Typescript

28 lines (27 loc) 684 B
import { AxiosError } from "axios"; /** * Represents HTTP Error */ export declare class APIError { /** * HTTP status of error. If it is empty, it means communication problem */ status?: number; /** * Parsed message from the storage engine */ message?: string; /** * Original error from HTTP client with the full information */ original?: AxiosError; /** * Create an error from AxiosError * @param error {AxiosError} */ static from(error: AxiosError): APIError; /** * Create an error from HTTP status and message */ constructor(message: string, status?: number, original?: AxiosError); }