Skip to content

Commit

Permalink
catch iso8601.ParseError
Browse files Browse the repository at this point in the history
  • Loading branch information
jonhealy1 committed Apr 24, 2024
1 parent 73402d9 commit 65ce2ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stac_fastapi/types/stac_fastapi/types/rfc3339.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def str_to_interval(interval: Optional[str]) -> Optional[DateTimeType]:
if len(values) > 1 and values[1] not in ["..", ""]
else None
)
except ValueError as e:
except (ValueError, iso8601.ParseError) as e:
raise HTTPException(status_code=400, detail=str(e))

if start is None and end is None:
Expand Down

0 comments on commit 65ce2ca

Please sign in to comment.