diff --git a/apps/studio/src/ipc-utils.ts b/apps/studio/src/ipc-utils.ts index 481a3a9a58..2bb89a1571 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 { getMainWindow } from 'src/main-window'; import type { StoredAuthToken } from '@studio/common/lib/shared-config'; -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 0479e6c27a..c1f0472e4b 100644 --- a/apps/studio/src/stores/sync/sync-operations-slice.ts +++ b/apps/studio/src/stores/sync/sync-operations-slice.ts @@ -868,14 +868,19 @@ 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 ), } ); } }