Skip to content

Add message to assert, and add it to the ProcessGraphInvalidException #290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions openeo_driver/ProcessGraphDeserializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1871,12 +1871,13 @@ def evaluate_process_from_url(process_id: str, namespace: str, args: dict, env:

try:
spec = res.json()
assert spec["id"].lower() == process_id.lower()
msg = f"Mismatch between expected process {process_id!r} and process {spec['id']!r} defined at {candidate!r}."
assert spec["id"].lower() == process_id.lower(), msg
process_graph = spec["process_graph"]
parameters = spec.get("parameters", [])
except Exception as e:
_log.error(f"Failed to load process {process_id!r} from {candidate!r}", exc_info=True)
raise ProcessGraphInvalidException() from e
raise ProcessGraphInvalidException(message=str(e)) from e

return _evaluate_process_graph_process(
process_id=process_id, process_graph=process_graph, parameters=parameters, args=args, env=env
Expand Down