Open travispaul opened 2 years ago
Unfortunately this library doesn't support that feature at the moment, though I'd like it if it did. Getting this to work in easy_jsonrpc
will require changes to the library.
Thanks for confirming @bddap, I think I can handle this in my application.
I'm probably missing something obvious, but I'm struggling to figure out how to return an error from within the procedure on the RPC server so that they're sent back to the client. I was hoping I to utilize
easy_jsonrpc::Error
but that doesn't seem to be handled specially (or I'm holding it wrong) and errors are returned in theresult
member instead of anerror
member.I'm specifically looking to return an custom
error
member as mentioned by the JSON RPC spec, but I've only been able to returnresult
:I've observed such errors being return in the event of an RPC error (invalid params, method doesn't exist, etc) but would like to return my own as well.
Any guidance on achieving those results are greatly appreciated!