Show errors to user if invalid scene data is loaded
Opened this issue · 1 comments
markmanx commented
It's not difficult for a user to trigger a validation error when loading a scene. At the moment, Isoflow fails silently (errors can only be seen in the console). Users will appreciate seeing an error message if Isoflow can't load their scene (probably best displayed in a modal). We use Zod for input validation, and ideally we would let the user know where the error is in their input (e.g. connector with id {xxx} references a node which doesn't exist
), but at this point that would be a nice-to-have.
At minimum Isoflow should display an error message if the scene fails to load.
markmanx commented
To recreate a validation error, pass in the following initialData
object (validation will fail because the nodes
property is missing):
const initialData = {
icons: [],
connectors: [],
rectangles: []
}