Skip to content

Commit

Permalink
fix from e33
Browse files Browse the repository at this point in the history
fix from Vitaliy-Svinchyak (e33) in PR rambler-digital-solutions#26
  • Loading branch information
Roms1383 committed Aug 31, 2021
1 parent 48ede44 commit 974d498
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ impl ResponseError for Error {
e.field_errors()
.iter()
.map(|(field, err)| {
let error = err.first().map(|err| format!("{}", err.code));
let error = err.first().map(|err| {
format!("{}", err.message.as_ref().unwrap_or(&err.code.clone()))
});
format!("\t{}: {}", field, error.unwrap_or_default())
})
.collect::<Vec<_>>()
Expand Down

0 comments on commit 974d498

Please sign in to comment.