Skip to content

Commit

Permalink
add statuscode
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Druzhitskiy committed Dec 1, 2023
1 parent 610b376 commit 8903429
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bob-common/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ impl From<Status> for Error {
let name = words.next();
let length = status.message().len();
match name {
None => Self::failed(format!("Can't parse status from {}", status.message())),
None => Self::failed(format!("Can't parse status from {:?}, {}", status.code(), status.message())),
Some(name) => match name {
"KeyNotFound" => parse_next(words, Self::key_not_found)
.unwrap_or_else(|| Self::failed(format!("Failed to parse key from {}", status.message()))),
Expand All @@ -171,7 +171,7 @@ impl From<Status> for Error {
"PearlChangeState" => Self::pearl_change_state(rest_words(words, length)),
"Unauthorized" => Self::unauthorized(),
"HolderTemporaryUnavailable" => Self::holder_temporary_unavailable(),
_ => Self::failed(format!("Can't parse status {:?} from {}", name, status.message())),
_ => Self::failed(format!("Can't parse status {:?} from {:?}, {}", name, status.code(), status.message())),
},
}
}
Expand Down

0 comments on commit 8903429

Please sign in to comment.