whatsapp-business
Version:
Node.js connector for the WhatsApp Business APIs with TypeScript support, integration tests and more.
76 lines (75 loc) • 2.93 kB
TypeScript
/**
* For more detailed descriptions about the API errors go here:
* https://developers.facebook.com/docs/whatsapp/cloud-api/support/error-codes
*/
export declare const ERROR_CODES: {
readonly 0: "AuthException";
readonly 1: "API Unknown";
readonly 2: "API Service";
readonly 3: "API Method";
readonly 4: "API Too Many Calls";
readonly 10: "API Permission Denied";
readonly 100: "Invalid parameter";
readonly 190: "Access token has expired";
readonly 200: "API Permission";
readonly 299: "API Permission";
readonly 368: "Temporarily blocked for policies violations";
readonly 506: "Duplicate Post";
readonly 80007: "Rate limit issues";
readonly 131052: "Media download error";
readonly 131042: "Business eligibility — Payment issue";
readonly 131043: "Message expired";
readonly 130429: "Rate limit hit";
readonly 131045: "Unsigned certificate";
readonly 131016: "Service Overloaded";
readonly 131047: "Re-engagement message";
readonly 131048: "Spam Rate limit hit";
readonly 131000: "Generic Error";
readonly 131051: "Unsupported message type";
readonly 131001: "Message too long";
readonly 131002: "Invalid recipient type";
readonly 131005: "Access denied";
readonly 131006: "Resource not found";
readonly 131008: "Required parameter is missing";
readonly 131009: "Parameter value is not valid";
readonly 131021: "Bad User";
readonly 132000: "Template Param Count Mismatch";
readonly 132001: "Template does not exist";
readonly 132005: "Template Hydrated Text Too Long";
readonly 132007: "Template Format Character Policy Violated";
readonly 132012: "Template Parameter Format Mismatch";
readonly 133000: "Incomplete Delete";
readonly 133001: "Decryption Error";
readonly 133002: "Backup Blob Decryption Error";
readonly 133003: "Recovery Token Decryption Error";
readonly 133004: "Server Temporarily Unavailable";
readonly 133005: "Security PIN Mismatch";
readonly 133006: "Recovery Token Incorrect";
readonly 133007: "Account Blocked";
readonly 133008: "Too Many PIN Guesses";
readonly 133009: "PIN Guessed Too Fast";
readonly 136025: "Verify code error";
};
export type WABAErrorCodes = keyof typeof ERROR_CODES;
export type WABAErrorMessages = typeof ERROR_CODES[keyof typeof ERROR_CODES];
/**
* For more detailed descriptions about the API errors go here:
* https://developers.facebook.com/docs/whatsapp/cloud-api/support/error-codes
*/
export type WABAErrorAPI = {
message: WABAErrorMessages;
type: string;
code: WABAErrorCodes;
error_data?: {
messaging_product: "whatsapp";
/**
* detailed error message to help with debugging
*/
details: string;
};
error_subcode?: number;
fbtrace_id: string;
};
export type DefaultWABAErrorAPI = {
error: WABAErrorAPI;
};