atomic-data-browser
atomic-data-browser copied to clipboard
Wrong datatype error handling
If a user changes the datatype for a property, the app can currently crash. The error should be handled more elegantly. Ideally, the user should be able to edit the wrong value.
We can handle this in three places:
Handle in final view
Which means in every input component, every show component...
Handle in hook
I either have to handle errors explicitly everywhere, or handle them in the useArray / useString hook. If we handle the error in the hook, we can pass a null / empty array. The error can appear in the console.
Handle in toArray()
We can add an argument to toArray to have some default value instead of throwing to prevent errors runtime.