feat(app): better error management on import fail

This commit is contained in:
dextmorgn
2025-12-01 13:35:14 +01:00
parent b5df7fd629
commit e2887c9a5b

View File

@@ -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])