From 1343dc360f97305a808d1256c1ccaede1f8702b3 Mon Sep 17 00:00:00 2001 From: Volodymyr Makukha Date: Thu, 2 Apr 2026 15:20:51 +0100 Subject: [PATCH 1/2] Render correct error and enable buttons when pull failed --- apps/studio/src/stores/sync/sync-operations-slice.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/studio/src/stores/sync/sync-operations-slice.ts b/apps/studio/src/stores/sync/sync-operations-slice.ts index 2e7dd736ed..817277d78e 100644 --- a/apps/studio/src/stores/sync/sync-operations-slice.ts +++ b/apps/studio/src/stores/sync/sync-operations-slice.ts @@ -906,14 +906,20 @@ const pollPullBackupThunk = createTypedAsyncThunk( ); } } catch ( error ) { - if ( signal.aborted ) { + const currentState = syncOperationsSelectors.selectPullState( + selectedSiteId, + remoteSiteId + )( getState() ); + + if ( signal.aborted && currentState?.status.key === 'cancelled' ) { return; } + Sentry.captureException( error ); return rejectWithValue( { title: sprintf( __( 'Error pulling from %s' ), currentPullState.selectedSite.name ), - message: __( 'Failed to check backup file size. Please try again.' ), + message: error instanceof Error ? error.message : String( error ), } ); } } From c72caff090f484dce67387fb96bb5a773d3f1269 Mon Sep 17 00:00:00 2001 From: Volodymyr Makukha Date: Mon, 6 Apr 2026 09:45:20 +0100 Subject: [PATCH 2/2] Lint --- apps/studio/src/ipc-utils.ts | 1 - apps/studio/src/stores/sync/sync-operations-slice.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/apps/studio/src/ipc-utils.ts b/apps/studio/src/ipc-utils.ts index f10917f959..8c75b83c96 100644 --- a/apps/studio/src/ipc-utils.ts +++ b/apps/studio/src/ipc-utils.ts @@ -6,7 +6,6 @@ import { PreviewCommandLoggerAction } from '@studio/common/logger-actions'; import { ImportExportEventData } from 'src/lib/import-export/handle-events'; import { StoredAuthToken } from 'src/lib/oauth'; import { getMainWindow } from 'src/main-window'; -import type { UserData } from 'src/storage/storage-types'; type SnapshotEventData = { action: PreviewCommandLoggerAction; diff --git a/apps/studio/src/stores/sync/sync-operations-slice.ts b/apps/studio/src/stores/sync/sync-operations-slice.ts index 817277d78e..64de7c14f9 100644 --- a/apps/studio/src/stores/sync/sync-operations-slice.ts +++ b/apps/studio/src/stores/sync/sync-operations-slice.ts @@ -915,7 +915,6 @@ const pollPullBackupThunk = createTypedAsyncThunk( return; } - Sentry.captureException( error ); return rejectWithValue( { title: sprintf( __( 'Error pulling from %s' ), currentPullState.selectedSite.name ),