Skip to content

Commit 0c702a2

Browse files
fix(tables): drop duplicate error toast on async import failure
1 parent fcc28f7 commit 0c702a2

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

apps/sim/app/workspace/[workspaceId]/tables/components/import-csv-dialog/import-csv-dialog.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,9 @@ export function ImportCsvDialog({
325325
void cancelTableImport(workspaceId, table.id, data.importId).catch(() => {})
326326
}
327327
},
328-
onError: (err) => {
328+
onError: () => {
329+
// The hook's onError surfaces the toast; just clear the tray indicator here.
329330
useImportTrayStore.getState().endUpload(table.id)
330-
toast.error(getErrorMessage(err, 'Failed to start import'))
331-
logger.error('Async CSV import failed to start', err)
332331
},
333332
}
334333
)

apps/sim/app/workspace/[workspaceId]/tables/tables.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -455,10 +455,9 @@ export function Tables() {
455455
useImportTrayStore.getState().cancel(result.tableId)
456456
void cancelTableImport(workspaceId, result.tableId, result.importId).catch(() => {})
457457
}
458-
} catch (err) {
458+
} catch {
459+
// The hook's onError surfaces the toast; just clear the tray indicator here.
459460
useImportTrayStore.getState().endUpload(pendingId)
460-
toast.error(`Failed to import ${file.name}`)
461-
logger.error('Error uploading CSV:', err)
462461
}
463462
}
464463

0 commit comments

Comments
 (0)