We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents acfbcc0 + 0fd84e8 commit 68a9bd9Copy full SHA for 68a9bd9
lib/Provider/Channel/GoWhatsApp/Gateway.php
@@ -901,6 +901,15 @@ private function checkUserOnWhatsApp(string $phoneNumber): bool {
901
);
902
}
903
904
+ if ($status === 404 || ($data['code'] ?? '') === 'DEVICE_NOT_FOUND') {
905
+ $this->eventDispatcher->dispatchTyped(new WhatsAppAuthenticationErrorEvent());
906
+
907
+ throw new MessageTransmissionException(
908
+ $this->l10n->t('WhatsApp device not found or not connected. Please reconfigure the device.'),
909
+ self::CODE_AUTHENTICATION,
910
+ );
911
+ }
912
913
if ($status === 403) {
914
throw new MessageTransmissionException('Access to the WhatsApp API was denied (403). Check permissions or IP allowlist.', self::CODE_FORBIDDEN);
915
0 commit comments