UNPKG

@lodestar/api

Version:

A Typescript REST client for the Ethereum Consensus API

11 lines (9 loc) 288 B
export class ApiError extends Error { status: number; operationId: string; constructor(message: string, status: number, operationId: string) { super(`${operationId} failed with status ${status}: ${message}`); this.status = status; this.operationId = operationId; } }