whatsapp-business-api
Version:
A Wrapper for Whatsapp Business Cloud API hosted by Meta.
28 lines (27 loc) • 640 B
TypeScript
declare abstract class CustomError extends Error {
constructor(message: string);
abstract serializeErrors(): {
message: string;
field?: string;
}[];
}
export interface ApiErrorResponse {
message: string;
type: string;
code: number;
error_data: {
messaging_product: string;
details: string;
};
error_subcode: number;
fbtrace_id: string;
}
export declare class WhatsappApiError extends CustomError {
payload: ApiErrorResponse;
errorCode: number;
constructor(payload: ApiErrorResponse);
serializeErrors(): {
message: string;
}[];
}
export {};