Skip to content

Commit

Permalink
fix/show_error_on_wf_execution (#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnyrahul authored Jul 29, 2024
1 parent bd5ea89 commit 56d5c73
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions backend/workflow_manager/workflow/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from workflow_manager.workflow.dto import ExecutionResponse
from workflow_manager.workflow.enums import SchemaEntity, SchemaType
from workflow_manager.workflow.exceptions import (
InternalException,
WorkflowDoesNotExistError,
WorkflowGenerationError,
WorkflowRegenerationError,
Expand Down Expand Up @@ -192,6 +193,12 @@ def execute(
hash_values_of_files=hashes_of_files,
include_metadata=include_metadata,
)
if (
execution_response.execution_status == "ERROR"
and execution_response.result
and execution_response.result[0].get("error")
):
raise InternalException(execution_response.result[0].get("error"))
return Response(
make_execution_response(execution_response),
status=status.HTTP_200_OK,
Expand Down

0 comments on commit 56d5c73

Please sign in to comment.