Skip to content

A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.

feat(app): better error management on import fail

dextmorgne2887c9a5bf5
diff --git a/flowsint-app/src/components/sketches/import-preview.tsx b/flowsint-app/src/components/sketches/import-preview.tsx
index 37ee807a..62b9615b 100644
--- a/flowsint-app/src/components/sketches/import-preview.tsx
+++ b/flowsint-app/src/components/sketches/import-preview.tsx
@@ -502,13 +502,13 @@ export function ImportPreview({
if (result.status === 'completed') {
setTimeout(onSuccess, 2000)
+ refetchGraph()
+ setIsImporting(false)
+ toast.success('Import successful!')
}
} catch (error) {
- toast.error('Failed to import')
- } finally {
- refetchGraph()
setIsImporting(false)
- toast.success('Import successful!')
+ toast.error('Failed to import. Check your types and try again.')
}
}, [mappingsById, sketchId, onSuccess, refetchGraph])