ds_get_latest_failure_log
Fetch all failed task logs from the last failed workflow instance, combining instance listing, task lookup, and log retrieval with partial diagnostic fallback.
Instructions
One-click fetch of all failed task logs from the latest failed instance.
Combines 3 common troubleshooting steps (list instances → list tasks → fetch logs).
v2.0.10: Added per-step error handling — returns partial diagnostic info even if some steps fail.
Args: project_name: Project name workflow_code: Process-definition code log_limit: Lines of log to fetch per failed task (default 500)
Returns: { "workflow_code": int, "instance_id": int, # Latest failed instance ID "instance_state": "FAILURE", "start_time": str, "failed_tasks": [ # All failed tasks { "task_instance_id": int, "task_name": str, "task_type": str, "start_time": str, "end_time": str, "log_tail": str # Last log_limit lines } ], "errors": [...] # v2.0.10: Per-step error messages "hint": ... }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| log_limit | No | ||
| project_name | Yes | ||
| workflow_code | Yes |