Skip to content

Commit

Permalink
fix: raise error if dict is malformed
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunato committed Nov 20, 2023
1 parent 7d0decf commit ce0c2ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion eodag/rest/utils.py
Expand Up @@ -371,7 +371,9 @@ def get_arguments_query_paths(arguments):
try:
arguments[a] = json.loads(value)
except JSONDecodeError:
logger.warning("argument is not a dict")
raise ValidationError(
f"Could not get argument query path: {value} is not a dict"
)
return dict(
(str(match.full_path), match.value)
for match in string_to_jsonpath(STAC_QUERY_PATTERN, force=True).find(arguments)
Expand Down

0 comments on commit ce0c2ff

Please sign in to comment.