UNPKG

deth

Version:

Ethereum node focused on Developer Experience

25 lines (24 loc) 823 B
import { ErrorRequestHandler } from 'express'; import * as t from 'io-ts'; import { Left } from 'fp-ts/lib/Either'; export declare const errorHandler: ErrorRequestHandler; export declare class IOTSError extends Error { readonly details: string[]; constructor(details: Left<t.Errors>); } export declare class HttpError extends Error { readonly code: number; readonly details?: string[] | undefined; constructor(code: number, msg: string, details?: string[] | undefined); toBody(): object; } export declare class BadRequestHttpError extends HttpError { constructor(details: string[]); } export declare class NotFoundHttpError extends HttpError { readonly details: string[]; constructor(details?: string[]); } export declare class InternalHttpError extends HttpError { constructor(); }