Skip to content

Commit

Permalink
in task response, do not error when there's no screenshot if task is …
Browse files Browse the repository at this point in the history
…still in progress (#188)
  • Loading branch information
wintonzheng authored Apr 14, 2024
1 parent 935453c commit 1638e7d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions skyvern/forge/sdk/routes/agent_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,12 @@ async def get_task(
"Failed to get share link for action screenshot",
artifact_id=artifact.artifact_id,
)
else:
LOG.error("Failed to get latest action screenshots")
elif task_obj.status in [TaskStatus.failed, TaskStatus.completed]:
LOG.error(
"Failed to get latest action screenshots in task response",
task_id=task_id,
task_status=task_obj.status,
)

failure_reason = None
if task_obj.status == TaskStatus.failed and (latest_step.output or task_obj.failure_reason):
Expand Down

0 comments on commit 1638e7d

Please sign in to comment.