Open jsturdy opened 5 years ago
Isn't this a duplicate issue to #85?
Some local methods return error codes, some set the error key, and some throw an exception.
Additionally which methods throw
? None come to mind presently. I'm only aware of those that set the error key.
Brief summary of issue
To better handle error conditions and unexpected behaviour, we should implement common exception types, and some handlers for cases where a usual course of action needs to be taken. The RPC method should always be handling the received exceptions and setting the
error
key in the response message (or handling, if it is appropriate for the method)Types of issue
Expected Behavior
error
key in theRPCMessage
responseerror
key in theRPCMessage
response in the event of an exception or error in the local methodCurrent Behavior
Some local methods return error codes, some set the
error
key, and somethrow
an exception.