mpp-sdk
Version:
SDK to talk to the Memento Payments Platform
37 lines (36 loc) • 924 B
TypeScript
import { AxiosError } from "axios";
interface ErrorResponse {
errors: {
field?: string;
code: string;
message: string;
}[];
}
export declare class MPPError extends Error {
request_id?: string;
data?: ErrorResponse;
constructor(message: string, aerr?: AxiosError);
}
export declare class AuthenticationError extends MPPError {
name: string;
}
export declare class GeneralError extends MPPError {
name: string;
}
export declare class InternalServerError extends MPPError {
name: string;
}
export declare class NotFoundError extends MPPError {
name: string;
}
export declare class ValidationError extends MPPError {
name: string;
}
export declare class UnknownError extends MPPError {
name: string;
}
export declare class LockedUserError extends MPPError {
name: string;
}
export declare const errorHandler: (err: unknown) => MPPError | Error;
export {};