SatoshiPortal / boltz-rust

Boltz client rust crate
https://docs.boltz.exchange
30 stars 16 forks source link

Correctly return error on POST requests that fail with HTTP error code #50

Closed ok300 closed 1 month ago

ok300 commented 1 month ago

Before this PR, POST calls that would fail with an HTTP error code would be returned as Ok(error_message).

This PR consolidates error handling in post such that, in the case above, the method returns Err(Error::HTTP(error_message)).

i5hi commented 1 month ago

Thanks @ok300 !