From 2f93633ed718f335b3c601e2c29a2af5383d74ca Mon Sep 17 00:00:00 2001 From: Nick Mills-Barrett Date: Tue, 6 Oct 2026 11:55:41 +0100 Subject: [PATCH] handlewhatsapp: request app state recovery when full sync fails to fetch Only decode errors emit AppStateSyncError, so a full sync that failed while fetching (e.g. a 403 on the snapshot download) was just logged and the collection stayed broken for good. Escalate any full sync error to the phone recovery request. --- pkg/connector/handlewhatsapp.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/connector/handlewhatsapp.go b/pkg/connector/handlewhatsapp.go index d320ad1..74d8a08 100644 --- a/pkg/connector/handlewhatsapp.go +++ b/pkg/connector/handlewhatsapp.go @@ -984,6 +984,7 @@ func (wa *WhatsAppClient) handleWAAppStateSyncError(ctx context.Context, evt *ev err := wa.Client.FetchAppState(ctx, evt.Name, true, false) if err != nil { log.Err(err).Msg("Full app state sync failed") + wa.handleWAAppStateSyncError(ctx, &events.AppStateSyncError{Name: evt.Name, FullSync: true, Error: err}) } else { log.Debug().Msg("Full app state sync succeeded") }