async-call-rpc

A lightweight JSON RPC client & server

Home > async-call-rpc > ErrorMapFunction

ErrorMapFunction type

Signature:

export type ErrorMapFunction<T = unknown> = (error: unknown, request: Readonly<Request>) => {
    code: number;
    message: string;
    data?: T;
};

References: Request