1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-30 12:00:38 +00:00

consistently use #[cause] and display causing errors (#73)

This commit is contained in:
Christopher Armstrong 2018-02-12 23:55:44 -06:00 committed by GitHub
parent eb041de36d
commit 4b8181476c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -403,8 +403,8 @@ pub enum UrlencodedError {
#[fail(display="Content type error")]
ContentType,
/// Payload error
#[fail(display="Error that occur during reading payload")]
Payload(PayloadError),
#[fail(display="Error that occur during reading payload: {}", _0)]
Payload(#[cause] PayloadError),
}
/// Return `BadRequest` for `UrlencodedError`
@ -435,11 +435,11 @@ pub enum JsonPayloadError {
#[fail(display="Content type error")]
ContentType,
/// Deserialize error
#[fail(display="Json deserialize error")]
Deserialize(JsonError),
#[fail(display="Json deserialize error: {}", _0)]
Deserialize(#[cause] JsonError),
/// Payload error
#[fail(display="Error that occur during reading payload")]
Payload(PayloadError),
#[fail(display="Error that occur during reading payload: {}", _0)]
Payload(#[cause] PayloadError),
}
/// Return `BadRequest` for `UrlencodedError`