How do I name a morph?
Throws:
TraversalError: id must be a morph (was missing)How can I rename this from "a morph" to a more meaningful message for users?
3 Replies
Oh yeah that sucks and should not be included in the error message will fix
Other than this, so far ArkType has the best default error output of any of the TS validation libraries I've used. ❤️
For writing little CLI tools that parse JSON data or config files, it's so nice to be able to just throw the error and give the end user something very easy to make sense of w/o having to roll error formatting code all the time.
That's great to hear! I still think there's more we can do to make discriminated union errors clearer but overall it is definitely a big advantage
I'm fixing that case right now. There should never be references to internal concepts like that in the default message
That error message is fixed in 2.1.11