autumn-js
Version:
Autumn JS Library
18 lines (16 loc) • 381 B
TypeScript
interface ErrorResponse {
message: string;
code: string;
}
declare class AutumnError extends Error {
readonly message: string;
readonly code: string;
constructor(response: ErrorResponse);
static fromError(error: any): AutumnError;
toString(): string;
toJSON(): {
message: string;
code: string;
};
}
export { AutumnError as A };