diff --git a/CHANGELOG.md b/CHANGELOG.md index 8708cb5..d4fea94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased] +### Added + +- Plain-language explanations, in all five admin languages, for 42 more provider error codes shown in message details and account health: Meta (allowed-list, registration, policy, payment, permission, rate-limit, template quality and parameter errors), Twilio (throttling, sender, geo permissions, unreachable and non-mobile numbers, blocked, A2P 10DLC), seven.io (every documented return code and delivery report) and Telegram (refused message, rejected token). Texts follow the providers' official error references. + ### Fixed - seven.io: the admin and README now say to set the webhook's request method to **JSON**. seven.io's default sends form fields, which MessageGate cannot read; such a signed webhook now logs a warning instead of being dropped without a trace. diff --git a/admin/src/translations/de.json b/admin/src/translations/de.json index 6278771..3856241 100644 --- a/admin/src/translations/de.json +++ b/admin/src/translations/de.json @@ -595,26 +595,68 @@ "reason.HTTP_401": "Der Anbieter hat die Zugangsdaten abgelehnt. Prüfen und erneut testen.", "reason.META_130429": "Das WhatsApp-Durchsatzlimit ist erreicht. MessageGate versucht es später erneut.", "reason.META_131026": "Die Nummer kann keine WhatsApp-Nachrichten empfangen (nicht auf WhatsApp oder alte App).", + "reason.META_131030": "Die Nummer steht nicht auf der Empfängerliste der Meta-Testnummer. Die Nummer im App-Dashboard unter WhatsApp > API Setup hinzufügen.", + "reason.META_131031": "Meta hat das WhatsApp-Business-Konto wegen eines Richtlinienverstoßes eingeschränkt oder gesperrt.", + "reason.META_131042": "Meta meldet ein Problem mit der Zahlungsmethode des WhatsApp-Business-Kontos.", "reason.META_131047": "Mehr als 24 Stunden seit der letzten Nachricht des Kontakts. Nur Vorlagen sind möglich.", "reason.META_131049": "Meta hat diese Marketingnachricht zum Schutz der Nutzererfahrung zurückgehalten.", "reason.META_131050": "Der Kontakt hat Marketingnachrichten dieses Unternehmens abbestellt.", + "reason.META_131053": "Meta konnte den Anhang nicht laden. Der Link muss öffentlich erreichbar sein.", "reason.META_131056": "Zu viele Nachrichten an diesen Kontakt in kurzer Zeit.", + "reason.META_132000": "Die Anzahl der Vorlagenvariablen passt nicht zur genehmigten Vorlage.", "reason.META_132001": "Die Vorlage existiert in dieser Sprache nicht oder ist nicht freigegeben.", + "reason.META_132015": "Meta hat die Vorlage wegen geringer Qualität pausiert.", + "reason.META_132016": "Meta hat die Vorlage wegen geringer Qualität dauerhaft deaktiviert.", + "reason.META_133010": "Die Telefonnummer ist noch nicht auf der WhatsApp Business Platform registriert.", "reason.META_190": "Das Meta-Zugriffstoken ist abgelaufen oder wurde widerrufen. Das Konto neu verbinden.", + "reason.META_INVALID_PARAMETER": "Meta hat einen Parameter der Anfrage abgelehnt (zum Beispiel das Nummernformat oder einen Vorlagenwert).", + "reason.META_PERMISSION": "Dem Meta-Zugriffstoken fehlt eine nötige Berechtigung. Ein Token mit den WhatsApp-Berechtigungen erstellen.", + "reason.META_RATE_LIMIT": "Meta-Ratenlimit erreicht (App, Business-Konto oder Telefonnummer). MessageGate versucht es später erneut.", + "reason.META_UNKNOWN": "Meta meldet einen unbekannten oder vorübergehenden Fehler. Die Nachricht wurde möglicherweise gesendet.", "reason.PAYLOAD_UNREADABLE": "Der gespeicherte Inhalt ließ sich nicht entschlüsseln (Schlüssel geändert).", "reason.RETRIES_EXHAUSTED": "Alle Wiederholungen sind fehlgeschlagen.", "reason.SANDBOX_REJECTED": "Sandbox: Die Testnummer simuliert eine Ablehnung durch den Provider.", + "reason.SEVEN_201": "seven.io hat die Absenderkennung abgelehnt (höchstens 11 Buchstaben und Ziffern oder 16 Ziffern).", + "reason.SEVEN_202": "seven.io hält die Nummer für ungültig.", + "reason.SEVEN_402": "seven.io hat ein Duplikat blockiert: Dieselbe SMS ging in den letzten 180 Sekunden an diese Nummer.", + "reason.SEVEN_403": "Das Tageslimit für diesen Empfänger bei seven.io ist erreicht. MessageGate versucht es später erneut.", + "reason.SEVEN_407001": "seven.io hat die Nachricht abgelehnt.", + "reason.SEVEN_407002": "seven.io sperrt SMS in dieses Zielland.", + "reason.SEVEN_407003": "Die Empfängernummer ist bei seven.io gesperrt.", + "reason.SEVEN_407004": "Der Empfänger hat sich bei seven.io abgemeldet. Die Einwilligung für SMS wurde widerrufen.", + "reason.SEVEN_407005": "Der Preis pro Teil liegt über dem im seven.io-Konto eingestellten Maximum.", + "reason.SEVEN_500": "Das seven.io-Konto hat kein Guthaben mehr.", + "reason.SEVEN_501": "Das Ausgabenlimit des seven.io-Kontos ist erreicht.", + "reason.SEVEN_600": "seven.io meldet einen Fehler beim Senden. Die Nachricht wurde möglicherweise gesendet.", + "reason.SEVEN_901": "seven.io konnte die Signatur der Anfrage nicht prüfen.", + "reason.SEVEN_902": "Der seven.io-API-Schlüssel hat keinen Zugriff auf diese Funktion.", + "reason.SEVEN_903": "Die IP-Adresse des Servers steht nicht auf der Freigabeliste von seven.io.", "reason.SEVEN_AUTH": "seven.io hat den API-Schlüssel abgelehnt.", + "reason.SEVEN_EXPIRED": "Die SMS wurde nicht vor Ablauf ihrer Gültigkeit zugestellt.", + "reason.SEVEN_FAILED": "Beim Senden der SMS ist ein Fehler aufgetreten.", + "reason.SEVEN_NOTDELIVERED": "Die SMS konnte nicht zugestellt werden. Die Nummer prüfen.", + "reason.SEVEN_REJECTED": "Der Mobilfunkbetreiber hat die SMS abgelehnt.", + "reason.SEVEN_TEXT": "Der Text ist zu lang oder hat mehr Teile, als das seven.io-Konto erlaubt.", + "reason.TG_400": "Telegram hat die Nachricht abgelehnt, zum Beispiel weil der Chat nicht existiert oder der Text ungültig ist.", "reason.TG_403": "Der Kontakt hat den Bot blockiert oder nie gestartet.", "reason.TG_429": "Telegram-Limit erreicht. MessageGate versucht es später erneut.", + "reason.TG_TOKEN": "Telegram hat das Bot-Token abgelehnt. Das Token prüfen und erneut testen.", "reason.TWILIO_21211": "Twilio hält die Nummer für ungültig.", + "reason.TWILIO_21408": "SMS in dieses Land sind in den Twilio-Geo-Berechtigungen nicht freigeschaltet.", "reason.TWILIO_21610": "Der Empfänger hat mit STOP geantwortet und sich abgemeldet.", + "reason.TWILIO_21612": "Twilio kann von diesem Absender nicht an diese Nummer senden.", + "reason.TWILIO_21614": "Die Nummer ist keine Mobilnummer und kann keine SMS empfangen.", "reason.TWILIO_30003": "Das Telefon ist ausgeschaltet oder nicht erreichbar.", + "reason.TWILIO_30004": "Die Nachricht wurde blockiert, zum Beispiel weil der Empfänger den Absender blockiert hat.", "reason.TWILIO_30005": "Die Nummer ist unbekannt oder existiert nicht mehr.", "reason.TWILIO_30006": "Der Netzbetreiber konnte nicht zustellen (Festnetz oder nicht erreichbar).", "reason.TWILIO_30007": "Der Netzbetreiber hat die Nachricht als Spam gefiltert.", + "reason.TWILIO_30008": "Der Netzbetreiber meldet einen unbekannten Zustellfehler.", + "reason.TWILIO_30034": "Die Absendernummer ist nicht für A2P 10DLC registriert, das SMS an US-Nummern voraussetzen.", "reason.TWILIO_63035": "Der RCS-Absender ist für diesen Netzbetreiber oder dieses Land noch nicht freigegeben.", "reason.TWILIO_63036": "Die Nummer ist per RCS nicht erreichbar (Gerät ohne RCS oder offline).", + "reason.TWILIO_SENDER": "Die Absendernummer ist für dieses Konto oder Ziel keine gültige, nachrichtenfähige Twilio-Nummer.", + "reason.TWILIO_THROTTLED": "Twilio hat die Anfrage gedrosselt (zu viele Anfragen oder volle Warteschlange des Absenders). MessageGate versucht es später erneut.", "send.channel": "Kanal", "send.channel.auto": "Automatisch", "send.channel.hint": "Automatisch folgt der Routing-Kette aus den Einstellungen.", diff --git a/admin/src/translations/en.json b/admin/src/translations/en.json index fb7371a..a69be1a 100644 --- a/admin/src/translations/en.json +++ b/admin/src/translations/en.json @@ -595,26 +595,68 @@ "reason.HTTP_401": "The provider rejected the credentials. Check them and test again.", "reason.META_130429": "The WhatsApp throughput limit was reached. MessageGate retries later.", "reason.META_131026": "The number cannot receive WhatsApp messages (not on WhatsApp or an old app).", + "reason.META_131030": "The recipient is not on the allowed list of the Meta test number. Add it in the App Dashboard under WhatsApp > API Setup.", + "reason.META_131031": "Meta restricted or disabled the WhatsApp Business Account for a policy violation.", + "reason.META_131042": "Meta reports a problem with the payment method of the WhatsApp Business Account.", "reason.META_131047": "More than 24 hours since the last message from the contact. Only templates can be sent.", "reason.META_131049": "Meta held back this marketing message to protect the user experience.", "reason.META_131050": "The contact stopped marketing messages from this business.", + "reason.META_131053": "Meta could not download the attachment. Check that its link is public.", "reason.META_131056": "Too many messages to this contact in a short time.", + "reason.META_132000": "The number of template variables does not match the approved template.", "reason.META_132001": "The template does not exist in this language or is not approved.", + "reason.META_132015": "Meta paused the template because of low quality.", + "reason.META_132016": "Meta disabled the template permanently because of low quality.", + "reason.META_133010": "The phone number is not registered on the WhatsApp Business Platform yet.", "reason.META_190": "The Meta access token expired or was revoked. Reconnect the account.", + "reason.META_INVALID_PARAMETER": "Meta rejected a parameter of the request (for example the number format or a template value).", + "reason.META_PERMISSION": "The Meta access token lacks a required permission. Create a token with the WhatsApp permissions.", + "reason.META_RATE_LIMIT": "Meta rate limit reached (app, business account or phone number). MessageGate retries later.", + "reason.META_UNKNOWN": "Meta reported an unknown or temporary error. The message may or may not have been sent.", "reason.PAYLOAD_UNREADABLE": "The stored content could not be decrypted (encryption key changed).", "reason.RETRIES_EXHAUSTED": "Every retry failed.", "reason.SANDBOX_REJECTED": "Sandbox: the test number simulates a provider rejection.", + "reason.SEVEN_201": "seven.io rejected the sender ID (at most 11 letters and digits or 16 digits).", + "reason.SEVEN_202": "seven.io considers the number invalid.", + "reason.SEVEN_402": "seven.io blocked a duplicate: the same SMS went to this number within the last 180 seconds.", + "reason.SEVEN_403": "The daily limit for this recipient at seven.io is reached. MessageGate retries later.", + "reason.SEVEN_407001": "seven.io declined the message.", + "reason.SEVEN_407002": "seven.io blocks SMS to this destination country.", + "reason.SEVEN_407003": "The recipient number is blocked at seven.io.", + "reason.SEVEN_407004": "The recipient unsubscribed at seven.io. Consent for SMS was revoked.", + "reason.SEVEN_407005": "The price per part is above the maximum set in the seven.io account.", + "reason.SEVEN_500": "The seven.io account has no credit left.", + "reason.SEVEN_501": "The spending limit of the seven.io account is reached.", + "reason.SEVEN_600": "seven.io reported an error while sending. The message may or may not have been sent.", + "reason.SEVEN_901": "seven.io could not verify the request signature.", + "reason.SEVEN_902": "The seven.io API key has no access to this function.", + "reason.SEVEN_903": "The server's IP address is not on the seven.io allow list.", "reason.SEVEN_AUTH": "seven.io rejected the API key.", + "reason.SEVEN_EXPIRED": "The SMS was not delivered before its validity period ended.", + "reason.SEVEN_FAILED": "An error occurred while sending the SMS.", + "reason.SEVEN_NOTDELIVERED": "The SMS could not be delivered. Check the number.", + "reason.SEVEN_REJECTED": "The mobile operator rejected the SMS.", + "reason.SEVEN_TEXT": "The text is too long or has more parts than the seven.io account allows.", + "reason.TG_400": "Telegram refused the message, for example because the chat does not exist or the text is invalid.", "reason.TG_403": "The contact blocked the bot or never started it.", "reason.TG_429": "Telegram rate limit reached. MessageGate retries later.", + "reason.TG_TOKEN": "Telegram rejected the bot token. Check it and test again.", "reason.TWILIO_21211": "Twilio considers the number invalid.", + "reason.TWILIO_21408": "SMS to this country is not enabled in the Twilio geo permissions.", "reason.TWILIO_21610": "The recipient replied STOP and unsubscribed.", + "reason.TWILIO_21612": "Twilio cannot send to this number from this sender.", + "reason.TWILIO_21614": "The number is not a mobile number and cannot receive SMS.", "reason.TWILIO_30003": "The phone is switched off or unreachable.", + "reason.TWILIO_30004": "The message was blocked, for example because the recipient blocked the sender.", "reason.TWILIO_30005": "The number is unknown or no longer exists.", "reason.TWILIO_30006": "The carrier could not deliver to this number (landline or unreachable).", "reason.TWILIO_30007": "The carrier filtered the message as spam.", + "reason.TWILIO_30008": "The carrier reported an unknown delivery error.", + "reason.TWILIO_30034": "The sender number is not registered for A2P 10DLC, which SMS to US numbers require.", "reason.TWILIO_63035": "The RCS sender is not approved for this carrier or country yet.", "reason.TWILIO_63036": "The number cannot be reached over RCS (device not RCS capable or offline).", + "reason.TWILIO_SENDER": "The sender number is not a valid message-capable Twilio number for this account or destination.", + "reason.TWILIO_THROTTLED": "Twilio throttled the request (too many requests or a full sender queue). MessageGate retries later.", "send.channel": "Channel", "send.channel.auto": "Automatic", "send.channel.hint": "Automatic follows the routing chain from the settings.", diff --git a/admin/src/translations/es.json b/admin/src/translations/es.json index 6d5b575..d321988 100644 --- a/admin/src/translations/es.json +++ b/admin/src/translations/es.json @@ -595,26 +595,68 @@ "reason.HTTP_401": "El proveedor rechazó las credenciales. Revísalas y vuelve a probar.", "reason.META_130429": "Se alcanzó el límite de rendimiento de WhatsApp. MessageGate lo reintentará más tarde.", "reason.META_131026": "El número no puede recibir mensajes de WhatsApp (no está en WhatsApp o tiene una app antigua).", + "reason.META_131030": "El destinatario no está en la lista permitida del número de prueba de Meta. Añádalo en el panel de la app, en WhatsApp > API Setup.", + "reason.META_131031": "Meta restringió o desactivó la cuenta de WhatsApp Business por infringir una política.", + "reason.META_131042": "Meta informa de un problema con el método de pago de la cuenta de WhatsApp Business.", "reason.META_131047": "Han pasado más de 24 horas desde el último mensaje del contacto. Solo se pueden enviar plantillas.", "reason.META_131049": "Meta retuvo este mensaje de marketing para proteger la experiencia del usuario.", "reason.META_131050": "El contacto dejó de recibir mensajes de marketing de esta empresa.", + "reason.META_131053": "Meta no pudo descargar el adjunto. Compruebe que su enlace sea público.", "reason.META_131056": "Demasiados mensajes a este contacto en poco tiempo.", + "reason.META_132000": "El número de variables no coincide con la plantilla aprobada.", "reason.META_132001": "La plantilla no existe en este idioma o no está aprobada.", + "reason.META_132015": "Meta pausó la plantilla por baja calidad.", + "reason.META_132016": "Meta desactivó la plantilla de forma permanente por baja calidad.", + "reason.META_133010": "El número de teléfono aún no está registrado en la WhatsApp Business Platform.", "reason.META_190": "El token de acceso de Meta caducó o fue revocado. Vuelve a conectar la cuenta.", + "reason.META_INVALID_PARAMETER": "Meta rechazó un parámetro de la solicitud (por ejemplo, el formato del número o un valor de la plantilla).", + "reason.META_PERMISSION": "Al token de acceso de Meta le falta un permiso necesario. Cree un token con los permisos de WhatsApp.", + "reason.META_RATE_LIMIT": "Se alcanzó el límite de frecuencia de Meta (app, cuenta empresarial o número). MessageGate lo reintenta más tarde.", + "reason.META_UNKNOWN": "Meta informa de un error desconocido o temporal. Es posible que el mensaje se haya enviado.", "reason.PAYLOAD_UNREADABLE": "El contenido guardado no se pudo descifrar (cambió la clave de cifrado).", "reason.RETRIES_EXHAUSTED": "Todos los reintentos fallaron.", "reason.SANDBOX_REJECTED": "Sandbox: el número de prueba simula un rechazo del proveedor.", + "reason.SEVEN_201": "seven.io rechazó el identificador del remitente (máximo 11 letras y cifras o 16 cifras).", + "reason.SEVEN_202": "seven.io considera que el número no es válido.", + "reason.SEVEN_402": "seven.io bloqueó un duplicado: el mismo SMS se envió a este número en los últimos 180 segundos.", + "reason.SEVEN_403": "Se alcanzó el límite diario de seven.io para este destinatario. MessageGate lo reintenta más tarde.", + "reason.SEVEN_407001": "seven.io rechazó el mensaje.", + "reason.SEVEN_407002": "seven.io bloquea los SMS a este país de destino.", + "reason.SEVEN_407003": "El número del destinatario está bloqueado en seven.io.", + "reason.SEVEN_407004": "El destinatario se dio de baja en seven.io. Se revocó el consentimiento para SMS.", + "reason.SEVEN_407005": "El precio por parte supera el máximo configurado en la cuenta de seven.io.", + "reason.SEVEN_500": "La cuenta de seven.io no tiene saldo.", + "reason.SEVEN_501": "Se alcanzó el límite de gasto de la cuenta de seven.io.", + "reason.SEVEN_600": "seven.io informa de un error durante el envío. Es posible que el mensaje se haya enviado.", + "reason.SEVEN_901": "seven.io no pudo verificar la firma de la solicitud.", + "reason.SEVEN_902": "La clave API de seven.io no tiene acceso a esta función.", + "reason.SEVEN_903": "La dirección IP del servidor no está en la lista permitida de seven.io.", "reason.SEVEN_AUTH": "seven.io rechazó la clave API.", + "reason.SEVEN_EXPIRED": "El SMS no se entregó antes de que terminara su período de validez.", + "reason.SEVEN_FAILED": "Se produjo un error al enviar el SMS.", + "reason.SEVEN_NOTDELIVERED": "No se pudo entregar el SMS. Compruebe el número.", + "reason.SEVEN_REJECTED": "El operador móvil rechazó el SMS.", + "reason.SEVEN_TEXT": "El texto es demasiado largo o tiene más partes de las que permite la cuenta de seven.io.", + "reason.TG_400": "Telegram rechazó el mensaje, por ejemplo porque el chat no existe o el texto no es válido.", "reason.TG_403": "El contacto bloqueó el bot o nunca lo inició.", "reason.TG_429": "Se alcanzó el límite de Telegram. MessageGate lo reintentará más tarde.", + "reason.TG_TOKEN": "Telegram rechazó el token del bot. Compruébelo y vuelva a probar.", "reason.TWILIO_21211": "Twilio considera el número no válido.", + "reason.TWILIO_21408": "Los SMS a este país no están habilitados en los permisos geográficos de Twilio.", "reason.TWILIO_21610": "El destinatario respondió STOP y se dio de baja.", + "reason.TWILIO_21612": "Twilio no puede enviar a este número desde este remitente.", + "reason.TWILIO_21614": "El número no es un número móvil y no puede recibir SMS.", "reason.TWILIO_30003": "El teléfono está apagado o no es alcanzable.", + "reason.TWILIO_30004": "El mensaje se bloqueó, por ejemplo porque el destinatario bloqueó al remitente.", "reason.TWILIO_30005": "El número es desconocido o ya no existe.", "reason.TWILIO_30006": "El operador no pudo entregar a este número (fijo o inaccesible).", "reason.TWILIO_30007": "El operador filtró el mensaje como spam.", + "reason.TWILIO_30008": "El operador informa de un error de entrega desconocido.", + "reason.TWILIO_30034": "El número del remitente no está registrado para A2P 10DLC, necesario para SMS a números de EE. UU.", "reason.TWILIO_63035": "El remitente RCS aún no está aprobado para este operador o país.", "reason.TWILIO_63036": "El número no es accesible por RCS (dispositivo sin RCS o sin conexión).", + "reason.TWILIO_SENDER": "El número del remitente no es un número de Twilio válido para mensajes con esta cuenta o este destino.", + "reason.TWILIO_THROTTLED": "Twilio limitó la solicitud (demasiadas solicitudes o cola del remitente llena). MessageGate lo reintenta más tarde.", "send.channel": "Canal", "send.channel.auto": "Automático", "send.channel.hint": "Automático sigue la cadena de enrutamiento de los ajustes.", diff --git a/admin/src/translations/fr.json b/admin/src/translations/fr.json index 9dd197f..f74d519 100644 --- a/admin/src/translations/fr.json +++ b/admin/src/translations/fr.json @@ -595,26 +595,68 @@ "reason.HTTP_401": "Le fournisseur a refusé les identifiants. Vérifiez-les et testez à nouveau.", "reason.META_130429": "La limite de débit WhatsApp est atteinte. MessageGate réessaiera plus tard.", "reason.META_131026": "Le numéro ne peut pas recevoir de messages WhatsApp (pas sur WhatsApp ou app trop ancienne).", + "reason.META_131030": "Le destinataire ne figure pas dans la liste autorisée du numéro de test Meta. Ajoutez-le dans le tableau de bord de l’app, sous WhatsApp > API Setup.", + "reason.META_131031": "Meta a restreint ou désactivé le compte WhatsApp Business pour non-respect d’une règle.", + "reason.META_131042": "Meta signale un problème avec le moyen de paiement du compte WhatsApp Business.", "reason.META_131047": "Plus de 24 heures depuis le dernier message du contact. Seuls les modèles sont possibles.", "reason.META_131049": "Meta a retenu ce message marketing pour préserver l'expérience des utilisateurs.", "reason.META_131050": "Le contact a désactivé les messages marketing de cette entreprise.", + "reason.META_131053": "Meta n’a pas pu télécharger la pièce jointe. Vérifiez que son lien est public.", "reason.META_131056": "Trop de messages vers ce contact en peu de temps.", + "reason.META_132000": "Le nombre de variables ne correspond pas au modèle approuvé.", "reason.META_132001": "Le modèle n'existe pas dans cette langue ou n'est pas approuvé.", + "reason.META_132015": "Meta a mis le modèle en pause en raison d’une qualité insuffisante.", + "reason.META_132016": "Meta a désactivé le modèle définitivement en raison d’une qualité insuffisante.", + "reason.META_133010": "Le numéro de téléphone n’est pas encore enregistré sur la WhatsApp Business Platform.", "reason.META_190": "Le jeton d'accès Meta a expiré ou a été révoqué. Reconnectez le compte.", + "reason.META_INVALID_PARAMETER": "Meta a refusé un paramètre de la requête (par exemple le format du numéro ou une valeur du modèle).", + "reason.META_PERMISSION": "Le jeton d’accès Meta n’a pas une autorisation requise. Créez un jeton avec les autorisations WhatsApp.", + "reason.META_RATE_LIMIT": "Limite de débit Meta atteinte (app, compte professionnel ou numéro). MessageGate réessaie plus tard.", + "reason.META_UNKNOWN": "Meta signale une erreur inconnue ou temporaire. Le message a peut-être été envoyé.", "reason.PAYLOAD_UNREADABLE": "Le contenu enregistré n'a pas pu être déchiffré (clé de chiffrement modifiée).", "reason.RETRIES_EXHAUSTED": "Toutes les tentatives ont échoué.", "reason.SANDBOX_REJECTED": "Sandbox : le numéro de test simule un refus du fournisseur.", + "reason.SEVEN_201": "seven.io a refusé l’identifiant d’expéditeur (11 lettres et chiffres ou 16 chiffres au maximum).", + "reason.SEVEN_202": "seven.io considère le numéro comme non valide.", + "reason.SEVEN_402": "seven.io a bloqué un doublon : le même SMS a été envoyé à ce numéro au cours des 180 dernières secondes.", + "reason.SEVEN_403": "La limite quotidienne de seven.io pour ce destinataire est atteinte. MessageGate réessaie plus tard.", + "reason.SEVEN_407001": "seven.io a refusé le message.", + "reason.SEVEN_407002": "seven.io bloque les SMS vers ce pays de destination.", + "reason.SEVEN_407003": "Le numéro du destinataire est bloqué chez seven.io.", + "reason.SEVEN_407004": "Le destinataire s’est désinscrit chez seven.io. Le consentement SMS a été révoqué.", + "reason.SEVEN_407005": "Le prix par partie dépasse le maximum défini dans le compte seven.io.", + "reason.SEVEN_500": "Le compte seven.io n’a plus de crédit.", + "reason.SEVEN_501": "La limite de dépenses du compte seven.io est atteinte.", + "reason.SEVEN_600": "seven.io signale une erreur lors de l’envoi. Le message a peut-être été envoyé.", + "reason.SEVEN_901": "seven.io n’a pas pu vérifier la signature de la requête.", + "reason.SEVEN_902": "La clé API seven.io n’a pas accès à cette fonction.", + "reason.SEVEN_903": "L’adresse IP du serveur ne figure pas dans la liste autorisée de seven.io.", "reason.SEVEN_AUTH": "seven.io a refusé la clé API.", + "reason.SEVEN_EXPIRED": "Le SMS n’a pas été distribué avant la fin de sa durée de validité.", + "reason.SEVEN_FAILED": "Une erreur s’est produite lors de l’envoi du SMS.", + "reason.SEVEN_NOTDELIVERED": "Le SMS n’a pas pu être distribué. Vérifiez le numéro.", + "reason.SEVEN_REJECTED": "L’opérateur mobile a refusé le SMS.", + "reason.SEVEN_TEXT": "Le texte est trop long ou compte plus de parties que le compte seven.io n’en autorise.", + "reason.TG_400": "Telegram a refusé le message, par exemple parce que la discussion n’existe pas ou que le texte n’est pas valide.", "reason.TG_403": "Le contact a bloqué le bot ou ne l'a jamais démarré.", "reason.TG_429": "Limite Telegram atteinte. MessageGate réessaiera plus tard.", + "reason.TG_TOKEN": "Telegram a refusé le jeton du bot. Vérifiez-le et testez à nouveau.", "reason.TWILIO_21211": "Twilio considère le numéro comme non valide.", + "reason.TWILIO_21408": "Les SMS vers ce pays ne sont pas activés dans les autorisations géographiques Twilio.", "reason.TWILIO_21610": "Le destinataire a répondu STOP et s'est désinscrit.", + "reason.TWILIO_21612": "Twilio ne peut pas envoyer vers ce numéro depuis cet expéditeur.", + "reason.TWILIO_21614": "Le numéro n’est pas un numéro mobile et ne peut pas recevoir de SMS.", "reason.TWILIO_30003": "Le téléphone est éteint ou injoignable.", + "reason.TWILIO_30004": "Le message a été bloqué, par exemple parce que le destinataire a bloqué l’expéditeur.", "reason.TWILIO_30005": "Le numéro est inconnu ou n'existe plus.", "reason.TWILIO_30006": "L'opérateur n'a pas pu distribuer à ce numéro (fixe ou injoignable).", "reason.TWILIO_30007": "L'opérateur a filtré le message comme spam.", + "reason.TWILIO_30008": "L’opérateur signale une erreur de distribution inconnue.", + "reason.TWILIO_30034": "Le numéro d’expéditeur n’est pas enregistré pour A2P 10DLC, requis pour les SMS vers les États-Unis.", "reason.TWILIO_63035": "L'expéditeur RCS n'est pas encore approuvé pour cet opérateur ou ce pays.", "reason.TWILIO_63036": "Le numéro n'est pas joignable en RCS (appareil sans RCS ou hors ligne).", + "reason.TWILIO_SENDER": "Le numéro d’expéditeur n’est pas un numéro Twilio valide pour l’envoi de messages avec ce compte ou cette destination.", + "reason.TWILIO_THROTTLED": "Twilio a limité la requête (trop de requêtes ou file d’attente de l’expéditeur pleine). MessageGate réessaie plus tard.", "send.channel": "Canal", "send.channel.auto": "Automatique", "send.channel.hint": "Automatique suit la chaîne de routage des paramètres.", diff --git a/admin/src/translations/pt.json b/admin/src/translations/pt.json index aae0982..4cc694d 100644 --- a/admin/src/translations/pt.json +++ b/admin/src/translations/pt.json @@ -595,26 +595,68 @@ "reason.HTTP_401": "O provedor recusou as credenciais. Confira e teste de novo.", "reason.META_130429": "O limite de vazão do WhatsApp foi atingido. O MessageGate tenta de novo mais tarde.", "reason.META_131026": "O número não pode receber mensagens do WhatsApp (não está no WhatsApp ou o app é antigo).", + "reason.META_131030": "O destinatário não está na lista permitida do número de teste da Meta. Adicione-o no painel do app, em WhatsApp > API Setup.", + "reason.META_131031": "A Meta restringiu ou desativou a conta do WhatsApp Business por violação de política.", + "reason.META_131042": "A Meta informa um problema com a forma de pagamento da conta do WhatsApp Business.", "reason.META_131047": "Mais de 24 horas desde a última mensagem do contato. Só é possível enviar modelos.", "reason.META_131049": "A Meta reteve esta mensagem de marketing para proteger a experiência do usuário.", "reason.META_131050": "O contato parou de receber mensagens de marketing desta empresa.", + "reason.META_131053": "A Meta não conseguiu baixar o anexo. Verifique se o link é público.", "reason.META_131056": "Mensagens demais para este contato em pouco tempo.", + "reason.META_132000": "O número de variáveis não corresponde ao modelo aprovado.", "reason.META_132001": "O modelo não existe neste idioma ou não está aprovado.", + "reason.META_132015": "A Meta pausou o modelo por baixa qualidade.", + "reason.META_132016": "A Meta desativou o modelo permanentemente por baixa qualidade.", + "reason.META_133010": "O número de telefone ainda não está registrado na WhatsApp Business Platform.", "reason.META_190": "O token de acesso da Meta expirou ou foi revogado. Conecte a conta de novo.", + "reason.META_INVALID_PARAMETER": "A Meta recusou um parâmetro da requisição (por exemplo, o formato do número ou um valor do modelo).", + "reason.META_PERMISSION": "Falta uma permissão necessária ao token de acesso da Meta. Crie um token com as permissões do WhatsApp.", + "reason.META_RATE_LIMIT": "Limite de taxa da Meta atingido (app, conta comercial ou número). O MessageGate tenta novamente mais tarde.", + "reason.META_UNKNOWN": "A Meta informa um erro desconhecido ou temporário. A mensagem pode ter sido enviada.", "reason.PAYLOAD_UNREADABLE": "O conteúdo salvo não pôde ser descriptografado (a chave de criptografia mudou).", "reason.RETRIES_EXHAUSTED": "Todas as tentativas falharam.", "reason.SANDBOX_REJECTED": "Sandbox: o número de teste simula uma recusa do provedor.", + "reason.SEVEN_201": "A seven.io recusou o identificador do remetente (no máximo 11 letras e dígitos ou 16 dígitos).", + "reason.SEVEN_202": "A seven.io considera o número inválido.", + "reason.SEVEN_402": "A seven.io bloqueou uma duplicata: o mesmo SMS foi enviado a este número nos últimos 180 segundos.", + "reason.SEVEN_403": "O limite diário da seven.io para este destinatário foi atingido. O MessageGate tenta novamente mais tarde.", + "reason.SEVEN_407001": "A seven.io recusou a mensagem.", + "reason.SEVEN_407002": "A seven.io bloqueia SMS para este país de destino.", + "reason.SEVEN_407003": "O número do destinatário está bloqueado na seven.io.", + "reason.SEVEN_407004": "O destinatário cancelou a inscrição na seven.io. O consentimento para SMS foi revogado.", + "reason.SEVEN_407005": "O preço por parte está acima do máximo definido na conta da seven.io.", + "reason.SEVEN_500": "A conta da seven.io está sem crédito.", + "reason.SEVEN_501": "O limite de gastos da conta da seven.io foi atingido.", + "reason.SEVEN_600": "A seven.io informa um erro durante o envio. A mensagem pode ter sido enviada.", + "reason.SEVEN_901": "A seven.io não conseguiu verificar a assinatura da requisição.", + "reason.SEVEN_902": "A chave de API da seven.io não tem acesso a esta função.", + "reason.SEVEN_903": "O endereço IP do servidor não está na lista de permissões da seven.io.", "reason.SEVEN_AUTH": "A seven.io recusou a chave de API.", + "reason.SEVEN_EXPIRED": "O SMS não foi entregue antes do fim do período de validade.", + "reason.SEVEN_FAILED": "Ocorreu um erro ao enviar o SMS.", + "reason.SEVEN_NOTDELIVERED": "Não foi possível entregar o SMS. Verifique o número.", + "reason.SEVEN_REJECTED": "A operadora móvel recusou o SMS.", + "reason.SEVEN_TEXT": "O texto é longo demais ou tem mais partes do que a conta da seven.io permite.", + "reason.TG_400": "O Telegram recusou a mensagem, por exemplo porque o chat não existe ou o texto é inválido.", "reason.TG_403": "O contato bloqueou o bot ou nunca o iniciou.", "reason.TG_429": "Limite do Telegram atingido. O MessageGate tenta de novo mais tarde.", + "reason.TG_TOKEN": "O Telegram recusou o token do bot. Verifique-o e teste novamente.", "reason.TWILIO_21211": "A Twilio considera o número inválido.", + "reason.TWILIO_21408": "SMS para este país não estão habilitados nas permissões geográficas da Twilio.", "reason.TWILIO_21610": "O destinatário respondeu STOP e se descadastrou.", + "reason.TWILIO_21612": "A Twilio não consegue enviar para este número a partir deste remetente.", + "reason.TWILIO_21614": "O número não é um número de celular e não pode receber SMS.", "reason.TWILIO_30003": "O celular está desligado ou inalcançável.", + "reason.TWILIO_30004": "A mensagem foi bloqueada, por exemplo porque o destinatário bloqueou o remetente.", "reason.TWILIO_30005": "O número é desconhecido ou não existe mais.", "reason.TWILIO_30006": "A operadora não conseguiu entregar a este número (fixo ou inacessível).", "reason.TWILIO_30007": "A operadora filtrou a mensagem como spam.", + "reason.TWILIO_30008": "A operadora informa um erro de entrega desconhecido.", + "reason.TWILIO_30034": "O número do remetente não está registrado para A2P 10DLC, exigido para SMS a números dos EUA.", "reason.TWILIO_63035": "O remetente RCS ainda não foi aprovado para esta operadora ou país.", "reason.TWILIO_63036": "O número não está acessível por RCS (aparelho sem RCS ou offline).", + "reason.TWILIO_SENDER": "O número do remetente não é um número da Twilio válido para mensagens nesta conta ou neste destino.", + "reason.TWILIO_THROTTLED": "A Twilio limitou a requisição (requisições demais ou fila do remetente cheia). O MessageGate tenta novamente mais tarde.", "send.channel": "Canal", "send.channel.auto": "Automático", "send.channel.hint": "Automático segue a cadeia de roteamento das configurações.", diff --git a/admin/src/utils/reasons.js b/admin/src/utils/reasons.js index cc335c1..ed549d5 100644 --- a/admin/src/utils/reasons.js +++ b/admin/src/utils/reasons.js @@ -14,6 +14,7 @@ export function reasonText(t, code) { switch (code) { case 'HTTP_401': case 'HTTP_403': + case 'TWILIO_20003': return t('reason.HTTP_401', 'The provider rejected the credentials. Check them and test again.'); case 'META_131026': return t('reason.META_131026', 'The number cannot receive WhatsApp messages (not on WhatsApp or an old app).'); @@ -39,6 +40,7 @@ export function reasonText(t, code) { case 'TG_429': return t('reason.TG_429', 'Telegram rate limit reached. MessageGate retries later.'); case 'SEVEN_AUTH': + case 'SEVEN_900': return t('reason.SEVEN_AUTH', 'seven.io rejected the API key.'); case 'TWILIO_21610': return t('reason.TWILIO_21610', 'The recipient replied STOP and unsubscribed.'); @@ -56,6 +58,151 @@ export function reasonText(t, code) { return t('reason.TWILIO_63035', 'The RCS sender is not approved for this carrier or country yet.'); case 'TWILIO_30006': return t('reason.TWILIO_30006', 'The carrier could not deliver to this number (landline or unreachable).'); + // Provider codes, from the official error references (read 2026-11-20): + // Meta https://developers.facebook.com/docs/whatsapp/cloud-api/support/error-codes , + // Twilio https://www.twilio.com/docs/api/errors/twilio-error-codes.json , + // seven.io https://docs.seven.io/en/rest-api/endpoints/sms (return codes) and + // https://docs.seven.io/en/rest-api/endpoints/status-reports (delivery reports). + case 'META_131030': + return t( + 'reason.META_131030', + 'The recipient is not on the allowed list of the Meta test number. Add it in the App Dashboard under WhatsApp > API Setup.' + ); + case 'META_133010': + return t('reason.META_133010', 'The phone number is not registered on the WhatsApp Business Platform yet.'); + case 'META_131031': + return t( + 'reason.META_131031', + 'Meta restricted or disabled the WhatsApp Business Account for a policy violation.' + ); + case 'META_131042': + return t( + 'reason.META_131042', + 'Meta reports a problem with the payment method of the WhatsApp Business Account.' + ); + case 'META_10': + case 'META_200': + case 'META_131005': + case 'META_3': + return t( + 'reason.META_PERMISSION', + 'The Meta access token lacks a required permission. Create a token with the WhatsApp permissions.' + ); + case 'META_4': + case 'META_80007': + case 'META_131048': + case 'META_133016': + return t( + 'reason.META_RATE_LIMIT', + 'Meta rate limit reached (app, business account or phone number). MessageGate retries later.' + ); + case 'META_132000': + return t('reason.META_132000', 'The number of template variables does not match the approved template.'); + case 'META_132015': + return t('reason.META_132015', 'Meta paused the template because of low quality.'); + case 'META_132016': + return t('reason.META_132016', 'Meta disabled the template permanently because of low quality.'); + case 'META_131053': + return t('reason.META_131053', 'Meta could not download the attachment. Check that its link is public.'); + case 'META_100': + case 'META_131008': + case 'META_131009': + return t( + 'reason.META_INVALID_PARAMETER', + 'Meta rejected a parameter of the request (for example the number format or a template value).' + ); + case 'META_1': + case 'META_2': + case 'META_131000': + return t( + 'reason.META_UNKNOWN', + 'Meta reported an unknown or temporary error. The message may or may not have been sent.' + ); + case 'TWILIO_20429': + case 'TWILIO_21611': + return t( + 'reason.TWILIO_THROTTLED', + 'Twilio throttled the request (too many requests or a full sender queue). MessageGate retries later.' + ); + case 'TWILIO_21212': + case 'TWILIO_21606': + return t( + 'reason.TWILIO_SENDER', + 'The sender number is not a valid message-capable Twilio number for this account or destination.' + ); + case 'TWILIO_21408': + return t('reason.TWILIO_21408', 'SMS to this country is not enabled in the Twilio geo permissions.'); + case 'TWILIO_21612': + return t('reason.TWILIO_21612', 'Twilio cannot send to this number from this sender.'); + case 'TWILIO_21614': + return t('reason.TWILIO_21614', 'The number is not a mobile number and cannot receive SMS.'); + case 'TWILIO_30004': + return t('reason.TWILIO_30004', 'The message was blocked, for example because the recipient blocked the sender.'); + case 'TWILIO_30034': + return t( + 'reason.TWILIO_30034', + 'The sender number is not registered for A2P 10DLC, which SMS to US numbers require.' + ); + case 'TWILIO_30008': + return t('reason.TWILIO_30008', 'The carrier reported an unknown delivery error.'); + case 'SEVEN_201': + return t('reason.SEVEN_201', 'seven.io rejected the sender ID (at most 11 letters and digits or 16 digits).'); + case 'SEVEN_202': + return t('reason.SEVEN_202', 'seven.io considers the number invalid.'); + case 'SEVEN_305': + case 'SEVEN_401': + return t('reason.SEVEN_TEXT', 'The text is too long or has more parts than the seven.io account allows.'); + case 'SEVEN_402': + return t( + 'reason.SEVEN_402', + 'seven.io blocked a duplicate: the same SMS went to this number within the last 180 seconds.' + ); + case 'SEVEN_403': + return t( + 'reason.SEVEN_403', + 'The daily limit for this recipient at seven.io is reached. MessageGate retries later.' + ); + case 'SEVEN_407001': + return t('reason.SEVEN_407001', 'seven.io declined the message.'); + case 'SEVEN_407002': + return t('reason.SEVEN_407002', 'seven.io blocks SMS to this destination country.'); + case 'SEVEN_407003': + return t('reason.SEVEN_407003', 'The recipient number is blocked at seven.io.'); + case 'SEVEN_407004': + return t('reason.SEVEN_407004', 'The recipient unsubscribed at seven.io. Consent for SMS was revoked.'); + case 'SEVEN_407005': + return t('reason.SEVEN_407005', 'The price per part is above the maximum set in the seven.io account.'); + case 'SEVEN_500': + return t('reason.SEVEN_500', 'The seven.io account has no credit left.'); + case 'SEVEN_501': + return t('reason.SEVEN_501', 'The spending limit of the seven.io account is reached.'); + case 'SEVEN_600': + return t( + 'reason.SEVEN_600', + 'seven.io reported an error while sending. The message may or may not have been sent.' + ); + case 'SEVEN_901': + return t('reason.SEVEN_901', 'seven.io could not verify the request signature.'); + case 'SEVEN_902': + return t('reason.SEVEN_902', 'The seven.io API key has no access to this function.'); + case 'SEVEN_903': + return t('reason.SEVEN_903', "The server's IP address is not on the seven.io allow list."); + case 'SEVEN_NOTDELIVERED': + return t('reason.SEVEN_NOTDELIVERED', 'The SMS could not be delivered. Check the number.'); + case 'SEVEN_EXPIRED': + return t('reason.SEVEN_EXPIRED', 'The SMS was not delivered before its validity period ended.'); + case 'SEVEN_REJECTED': + return t('reason.SEVEN_REJECTED', 'The mobile operator rejected the SMS.'); + case 'SEVEN_FAILED': + return t('reason.SEVEN_FAILED', 'An error occurred while sending the SMS.'); + case 'TG_400': + return t( + 'reason.TG_400', + 'Telegram refused the message, for example because the chat does not exist or the text is invalid.' + ); + case 'TG_401': + case 'TG_404': + return t('reason.TG_TOKEN', 'Telegram rejected the bot token. Check it and test again.'); case 'NUMBER_INACTIVE': return t('error.NUMBER_INACTIVE', 'The number is not assigned to a subscriber (number check).'); case 'SANDBOX_REJECTED': diff --git a/docs/acceptance/2026-11-20-admin-provider-errors.md b/docs/acceptance/2026-11-20-admin-provider-errors.md new file mode 100644 index 0000000..a681fe9 --- /dev/null +++ b/docs/acceptance/2026-11-20-admin-provider-errors.md @@ -0,0 +1,26 @@ +# Admin UI acceptance: provider error explanations and webhook hints (2026-11-20) + +Build under test: `npm pack` of a local merge of #13 (provider fixes, incl. the per-provider webhook hints), #15 (contract and live tests) and this branch (provider error explanations), installed from the tarball into an isolated host. + +## Host + +- Strapi 5.63.0 and `@strapi/plugin-users-permissions` 5.63.0, SQLite, loopback port 1490, `server.url` `https://cms.example.test`. +- `providers.mode: 'sandbox'`, worker off; `NODE_OPTIONS=-r block-egress.cjs` (only loopback sockets) and a browser context that aborts every non-loopback request. +- Secrets generated with `crypto.randomBytes` into a mode-600 `.env`; admin `admin@example.test` registered through `POST /admin/register-admin`. +- Synthetic fixtures (bootstrap seed): four accounts (Meta, Telegram, seven.io with health `SEVEN_501`, Twilio), an approved WhatsApp and an SMS template, ten contacts `+49 1555 0100 001…010`, ten messages with the codes `SEVEN_407004`, `TWILIO_21610`, `META_131030`, `TWILIO_21408`, `SEVEN_402`, `SEVEN_600` (uncertain), `META_132015`, `SEVEN_EXPIRED`, plus one sent and one delivered message. + +## Matrix + +Playwright 1.65.1 (Chromium headless), own context per run. Six screens (messages, message details of a failed message, accounts, settings, inbox, templates) × 1440/1024/768/390/320 × light/dark = 60 runs with the workbench `measure.js`. + +| Check | Result | +| ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `documentOverflow` | 0 in all 60 runs | +| `rowHeightMismatch`, `offScaleGaps`, `clippedText`, `lowContrast` | none | +| `elementsOutsideViewport` | only at 768: the last section tab ("Settings") of the horizontally scrolling section strip, reachable with its next button (same as 2026-11-11) | +| `smallTargets` | only the accepted native exceptions from 2026-11-11: DS `Field.Action` copy icon (16 × 16) in the webhook URL fields, DS Tag remove buttons (28 × 28) below 768 px | +| Plugin console errors or warnings | 0 | +| Message details | the failed message shows the code and its explanation ("The recipient unsubscribed at seven.io. Consent for SMS was revoked.") in light and dark at every width | +| Accounts | seven.io shows "request method JSON" next to its webhook URL, Twilio shows where the URL goes, the unhealthy seven.io account shows `SEVEN_501` with its explanation | + +Screenshots (30, synthetic data only) were kept outside the repository with the run; they are not README images. diff --git a/tests/admin.test.js b/tests/admin.test.js index b86c82e..d1f8f13 100644 --- a/tests/admin.test.js +++ b/tests/admin.test.js @@ -307,3 +307,34 @@ test('utils: provider credentials, send form, settings, messages, contacts, form const r = f.rangeFor('7d', Date.UTC(2026, 10, 11, 12)); assert.ok(r.to > r.from && r.to - r.from > 6 * 86_400_000); }); + +test('reasons: every provider error code MessageGate classifies has a plain-language explanation', async () => { + // reasons.js is an ES module without imports in a CommonJS package. + const source = fs.readFileSync(path.join(ADMIN, 'utils/reasons.js'), 'utf8'); + const { reasonText } = await import(`data:text/javascript,${encodeURIComponent(source)}`); + const en = read('en'); + const t = (id, fallback) => { + assert.equal(en[id], fallback, `${id} default differs from en.json`); + return fallback; + }; + // The codes the adapters map to a retry decision or an account problem + // (server/src/adapters/*.js), plus the documented delivery-report codes. + const codes = [ + ...[1, 2, 3, 4, 10, 100, 190, 200, 80007, 130429, 131000, 131005, 131008, 131009, 131026, 131030, 131031] + .concat([131042, 131047, 131048, 131049, 131050, 131053, 131056, 132000, 132001, 132015, 132016, 133010, 133016]) + .map((c) => `META_${c}`), + ...[20003, 20429, 21211, 21212, 21408, 21606, 21610, 21611, 21612, 21614, 30003, 30004, 30005, 30006, 30007] + .concat([30008, 30034, 63035, 63036]) + .map((c) => `TWILIO_${c}`), + ...[201, 202, 305, 401, 402, 403, 407001, 407002, 407003, 407004, 407005, 500, 501, 600, 901, 902, 903] + .map((c) => `SEVEN_${c}`) + .concat(['SEVEN_AUTH', 'SEVEN_900', 'SEVEN_NOTDELIVERED', 'SEVEN_EXPIRED', 'SEVEN_REJECTED', 'SEVEN_FAILED']), + 'TG_400', + 'TG_401', + 'TG_403', + 'TG_404', + 'TG_429', + ]; + const missing = codes.filter((code) => !reasonText(t, code)); + assert.deepEqual(missing, [], 'codes without an explanation'); +});