Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rust cln-rpc crate: Fix
call_enum
and call
I've broken the error-handling for `call` in a previous commit. The key problem is that it failed to parse Json-RPC error's that were returned by the server. It always returned a parse- error instead. To fix it I've adapted `call_raw_request`. In the previous implementation local errors (e.g: Failing to find the socket-file) where returned in a Result::Err. However, when the rpc-server returned an error the data was encoded in the Result::Ok. In this commit every error is returned as a `Result::Err` and various methods and other calls have been edited to match this behavior. I've also added additonal testing
- Loading branch information