src/api_schema/schema.rs: improve error messages

This commit is contained in:
Dietmar Maurer 2019-05-19 10:18:51 +02:00
parent 0c516b123d
commit 178ac042c4
1 changed files with 2 additions and 2 deletions

View File

@ -110,13 +110,13 @@ impl IntegerSchema {
if let Some(minimum) = self.minimum { if let Some(minimum) = self.minimum {
if value < minimum { if value < minimum {
bail!("value must have a minimum value of {}", minimum); bail!("value must have a minimum value of {} (got {})", minimum, value);
} }
} }
if let Some(maximum) = self.maximum { if let Some(maximum) = self.maximum {
if value > maximum { if value > maximum {
bail!("value must have a maximum value of {}", maximum); bail!("value must have a maximum value of {} (got {})", maximum, value);
} }
} }