@taquito/http-utils
Version:
34 lines (33 loc) • 1.05 kB
TypeScript
import { NetworkError } from '@taquito/core';
import { STATUS_CODE } from './status_code';
/**
* @category Error
* @description Error that indicates a general failure in making the HTTP request
*/
export declare class HttpRequestFailed extends NetworkError {
readonly method: string;
readonly url: string;
readonly cause: Error;
constructor(method: string, url: string, cause: Error);
}
/**
* @category Error
* @description Error thrown when the endpoint returns an HTTP error to the client
*/
export declare class HttpResponseError extends NetworkError {
readonly message: string;
readonly status: STATUS_CODE;
readonly statusText: string;
readonly body: string;
readonly url: string;
constructor(message: string, status: STATUS_CODE, statusText: string, body: string, url: string);
}
/**
* @category Error
* @description Error
*/
export declare class HttpTimeoutError extends NetworkError {
readonly timeout: number;
readonly url: string;
constructor(timeout: number, url: string);
}