in task response, do not error when there's no screenshot if task is still in progress (#188)

This commit is contained in:
Shuchang Zheng
2024-04-13 21:20:16 -07:00
committed by GitHub
parent 935453c3da
commit 1638e7d073

View File

@@ -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):