mibes / couch-rs

CouchDB library for Rust
Apache License 2.0
59 stars 17 forks source link

Convert JSON decode errors from reqwest #23

Closed jgrund closed 2 years ago

jgrund commented 2 years ago

Convert JSON decode errors from reqwest to the relevant CouchError variant.

Use an extension trait to do this.

Signed-off-by: Joe Grund jgrund@whamcloud.io

mibes commented 2 years ago

Thanks @jgrund. Is there a way to get the new functionality tested with a unit test?

jgrund commented 2 years ago

I'm not sure it's useful in this case, but I added a test.

mibes commented 2 years ago

Thanks! For a large part this test is to document the expected behaviour.