Skip to content

Commit

Permalink
Merge pull request #85 from hug-dev/error-conversions
Browse files Browse the repository at this point in the history
Add a uuid::Error conversion
  • Loading branch information
hug-dev authored Oct 8, 2020
2 parents 09e4e50 + 2686966 commit f06fbe0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/requests/response_status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,16 @@ impl From<bincode::Error> for ResponseStatus {
}
}

impl From<uuid::Error> for ResponseStatus {
fn from(err: uuid::Error) -> Self {
warn!(
"Conversion from {} to ResponseStatus::InvalidEncoding.",
err
);
ResponseStatus::InvalidEncoding
}
}

impl From<std::num::TryFromIntError> for ResponseStatus {
fn from(err: std::num::TryFromIntError) -> Self {
warn!(
Expand Down

0 comments on commit f06fbe0

Please sign in to comment.