connect-jsonrpc
connect-jsonrpc copied to clipboard
add support for error.data
The JSON-RPC 2.0 specification allows for an optional "data" element in errors. Currently there is no way to set this data element from anywhere. A simple solution is to just put "err.data" in the error object if it is present in the exception thrown. One-liner change.
Thank you in advance :-)