mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-24 16:02:59 +01:00
consistently use #[cause]
and display causing errors (#73)
This commit is contained in:
parent
eb041de36d
commit
4b8181476c
12
src/error.rs
12
src/error.rs
@ -403,8 +403,8 @@ pub enum UrlencodedError {
|
|||||||
#[fail(display="Content type error")]
|
#[fail(display="Content type error")]
|
||||||
ContentType,
|
ContentType,
|
||||||
/// Payload error
|
/// Payload error
|
||||||
#[fail(display="Error that occur during reading payload")]
|
#[fail(display="Error that occur during reading payload: {}", _0)]
|
||||||
Payload(PayloadError),
|
Payload(#[cause] PayloadError),
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Return `BadRequest` for `UrlencodedError`
|
/// Return `BadRequest` for `UrlencodedError`
|
||||||
@ -435,11 +435,11 @@ pub enum JsonPayloadError {
|
|||||||
#[fail(display="Content type error")]
|
#[fail(display="Content type error")]
|
||||||
ContentType,
|
ContentType,
|
||||||
/// Deserialize error
|
/// Deserialize error
|
||||||
#[fail(display="Json deserialize error")]
|
#[fail(display="Json deserialize error: {}", _0)]
|
||||||
Deserialize(JsonError),
|
Deserialize(#[cause] JsonError),
|
||||||
/// Payload error
|
/// Payload error
|
||||||
#[fail(display="Error that occur during reading payload")]
|
#[fail(display="Error that occur during reading payload: {}", _0)]
|
||||||
Payload(PayloadError),
|
Payload(#[cause] PayloadError),
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Return `BadRequest` for `UrlencodedError`
|
/// Return `BadRequest` for `UrlencodedError`
|
||||||
|
Loading…
Reference in New Issue
Block a user