From 178ac042c433bcfa3c95cd36bc82d841e1597cf9 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Sun, 19 May 2019 10:18:51 +0200 Subject: [PATCH] src/api_schema/schema.rs: improve error messages --- src/api_schema/schema.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api_schema/schema.rs b/src/api_schema/schema.rs index 8f1c3a9d..0223860b 100644 --- a/src/api_schema/schema.rs +++ b/src/api_schema/schema.rs @@ -110,13 +110,13 @@ impl IntegerSchema { if let Some(minimum) = self.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 value > maximum { - bail!("value must have a maximum value of {}", maximum); + bail!("value must have a maximum value of {} (got {})", maximum, value); } }