Skip to content

bitcoind errors are swallowed #877

@devrandom

Description

@devrandom

HttpClient.read_response bails out without reading the body if ! status.is_ok(). However, normally servers use a non-OK status code when returning an error description in the body, so this swallows all error information and just returns a NotFound with a generic message to the caller. In particular bitcoind returns a 500 error, even while returning a meaningful JSON error (?!).

Instead, we should read the body and propagate a more detailed error to the API user (all the way out of RpcClient.call_method). We should also log this when invoking call_method from inside the lightning crate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions