You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
True! I have two ideas how to solve this, please tell me what you like more (could also do both actually):
Add an optional throwOnError parameter to the load function. In that case, instead of silently failing it will throw an error and fail to load completely
Make the load function return an array of errors. These errors could be either raw strings like what you mentioned above or objects like:
The second option is basically what I'm doing right now but checking it after the load step by step. So that would probably be my preferred way. I also like that the whole load doesn't fail if one node type is missing but others are available. So I'm just showing a warning message to the user which types are missing.
For example if I load an editor state and I have not registered a node type that is used, there are some warning logged:
but there's no way of easily checking if the loading was successful.
The text was updated successfully, but these errors were encountered: