UNPKG

blockcypher-client

Version:

A TypeScript client for interacting with BlockCypher's API that provides strong typing and safety when interacting with BlockCypher services.

15 lines (14 loc) 482 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ApiError = void 0; class ApiError extends Error { constructor(response) { super(`An unexpected API Error occured: ${response.statusText} (${response.status})`); this.name = "API Error"; this.status = response.status; this.statusText = response.statusText; this.url = response.url; this.body = response.body; } } exports.ApiError = ApiError;