UNPKG

meta-cloud-api

Version:
22 lines (20 loc) 565 B
interface MetaError extends Error { error: { message: string; type: string; code: number; error_data?: { messaging_product: 'whatsapp'; details: string; }; error_subcode?: number; fbtrace_id: string; }; } /** * Determines if the error is a Meta API error response * @param error Any error object to check * @returns Type guard indicating if error is a Meta API error */ declare function isMetaError(error: any): error is MetaError; export { type MetaError, isMetaError };