From 16667199cdb097b1214613eab1580d00473c7dfc Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Sat, 13 Oct 2018 11:31:21 -0400 Subject: [PATCH] feat(geo_common): improve boundary.rect error message In the case where a min lat/lon is larger than a max lat/lon, the error message was a bit confusing as it did not show the actual property name or the values that are causing errors. --- sanitizer/_geo_common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sanitizer/_geo_common.js b/sanitizer/_geo_common.js index e8134cc1..2f2fbfd4 100644 --- a/sanitizer/_geo_common.js +++ b/sanitizer/_geo_common.js @@ -49,7 +49,7 @@ function sanitize_bbox_min_max(raw, key_prefix) { const min = parseFloat(raw[`${key_prefix}.min_${dimension}`]); if (max <= min) { - throw new Error(`min_${dimension} is larger than max_${dimension} in ${key_prefix}`); + throw new Error(`${key_prefix}.min_${dimension} (${min}) must be less than ${key_prefix}.max_${dimension} (${max})`); } }); }