UNPKG

stellar-plus

Version:

beta version of stellar-plus, an all-in-one sdk for the Stellar blockchain

19 lines (18 loc) 663 B
import axios, { AxiosError } from 'axios'; export declare enum AxiosErrorTypes { AxiosResponseError = "AxiosResponseError", AxiosRequestError = "AxiosRequestError", UnknownError = "UnknownError" } export type AxiosRequestType = typeof axios.defaults.adapter extends (...args: any[]) => any ? ReturnType<typeof axios.defaults.adapter> : never; export type AxiosErrorInfo = { type: AxiosErrorTypes; message: string; code?: string; status?: number; statusText?: string; data?: any | undefined; request?: AxiosRequestType; url?: string; }; export declare const extractAxiosErrorInfo: (error: AxiosError) => AxiosErrorInfo;