autumn-js
Version:
Autumn JS Library
21 lines (19 loc) • 480 B
text/typescript
interface ClientErrorResponse {
message: string;
code: string;
}
declare class AutumnClientError extends Error {
error: ClientErrorResponse;
code: string;
constructor(error: ClientErrorResponse);
toString(): string;
toJSON(): {
message: string;
code: string;
};
}
declare const toClientError: (error: any) => {
data: null;
error: AutumnClientError;
};
export { AutumnClientError, type ClientErrorResponse, toClientError };