diff --git a/CHANGES.md b/CHANGES.md index 1b72c3c45..180804ed8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,11 +2,15 @@ ## [Unreleased] +### Added + +- added descriptive message to `types.search.str2bbox` length assert + ### Fixed -- Fix collection-search POST request model: - - Fix pydantic model to make sure class variables `_start_date` and `_end_date` not edited (ported from stac-pydantic) - - Fix bbox validation to allow anti-meridian crossing (ported from stac-pydantic) +- fix collection-search POST request model: + - fix pydantic model to make sure class variables `_start_date` and `_end_date` not edited (ported from stac-pydantic) + - fix bbox validation to allow anti-meridian crossing (ported from stac-pydantic) ## [5.0.2] - 2025-01-30 diff --git a/stac_fastapi/types/stac_fastapi/types/search.py b/stac_fastapi/types/stac_fastapi/types/search.py index 19f05caca..ea0a83818 100644 --- a/stac_fastapi/types/stac_fastapi/types/search.py +++ b/stac_fastapi/types/stac_fastapi/types/search.py @@ -35,7 +35,7 @@ def str2bbox(x: str) -> Optional[BBox]: """Convert string to BBox based on , delimiter.""" if x: t = tuple(float(v) for v in str2list(x)) - assert len(t) == 4 + assert len(t) == 4, f"BBox '{x}' must have 4 values." return t return None