From 95fca89b2f99ed085a2aa6a5b562cb83089a2175 Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez Date: Mon, 26 Oct 2026 16:22:25 +0000 Subject: [PATCH] errors: fail sends to numbers that aren't on WhatsApp permanently --- pkg/connector/errors.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/connector/errors.go b/pkg/connector/errors.go index 1ee1b205..288b8f38 100644 --- a/pkg/connector/errors.go +++ b/pkg/connector/errors.go @@ -73,6 +73,12 @@ func wrapWhatsAppError(err error) error { WithStatus(event.MessageStatusFail). WithIsCertain(true). WithSendNotice(true) + case errors.Is(err, whatsmeow.ErrRecipientNotOnWhatsApp): + return bridgev2.WrapErrorInStatus(err). + WithMessage("this phone number isn't on WhatsApp"). + WithStatus(event.MessageStatusFail). + WithIsCertain(true). + WithSendNotice(true) case errors.Is(err, whatsmeow.ErrServerReturnedError), errors.As(err, &iqErr): return bridgev2.WrapErrorInStatus(err). WithMessage("WhatsApp returned an error").