#json-error #transform #rocket #popular #aimed #reqwest #diesel

json_errors

Transforms popular crates' errors into JSON errors. Aimed to be used with Rocket.

25 releases

0.5.5 Jul 19, 2022
0.5.4 Sep 18, 2019
0.5.0 Aug 27, 2019
0.4.3 Jul 2, 2019
0.1.10 Jul 26, 2018

#3 in #aimed


Used in checkout

MIT license

11KB
230 lines

rs_json_errors

Transforms popular crates' errors into JSON errors. Aimed to be used with Rocket.


lib.rs:

JsonErrors

This crate provides an easy way to handle errors from popular crates and transform it into a JSON response. It is meant to be used with Rocket

Diesel

Diesel errors are supported through the diesel feature

Reqwest

Reqwest errors are supported through the reqwest feature

Reqwest

Errors from the stripe crate are supported through the stripe_api feature

Dependencies

~12–26MB
~412K SLoC