Skip to content

Commit

Permalink
Merge pull request #81 from uc-cdis/fix/error-messages
Browse files Browse the repository at this point in the history
feat(msg): add generic message for failed pods if none exists
  • Loading branch information
kmhernan authored Mar 3, 2023
2 parents 88532fc + dfd7e31 commit ec3bcfa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/argowrapper/engine/argo_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,15 @@ def _get_workflow_log_dict(self, workflow_name: str) -> Dict:
def _get_log_errors(self, status_nodes_dict: Dict) -> List[Dict]:
errors = []
for _, step in status_nodes_dict.items():
if step.get("phase") in ("Failed", "Error") and step.get("message", ""):
if step.get("phase") in ("Failed", "Error"):
message = (
step["message"] if step.get("message") else "No message provided"
)
errors.append(
{
"name": step.get("name"),
"step_template": step.get("templateName"),
"error_message": step.get("message"),
"error_message": message,
}
)
else:
Expand Down

0 comments on commit ec3bcfa

Please sign in to comment.