generated from MetaMask/metamask-module-template
-
Notifications
You must be signed in to change notification settings - Fork 7
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Following #149, we should modify the marshaling functions in @ocap/streams such that errors from @ocap/errors are unmarshaled into their respective classes, based on the error code.
There's a question of how much runtime type validation we want to do here. It may be reasonable to pursue either of these paths:
- assume that an object that matches the basic error shape and has a recognized code can be instantiated as the appropriate error class.
- Add Superstruct guards for each custom error class and only instantiate them if the guards pass. Otherwise, just instantiate as a plain error, or throw because we've messed up (assuming we're only dealing with kernel and not user data).
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request