Hello. I am using Prefect 2.8.6. I am running ECS ...
# ask-community
s
Hello. I am using Prefect 2.8.6. I am running ECS task within a flow using the ECS Task block. Even if an application error occurs within the ECS task, the error is not recognized by the flow, and the flow terminates as a success. Is there any way to detect errors in ECS tasks executed in the flow other than by determining them from the
status_code
of the
ECSTaskResult
?
Copy code
from prefect_aws.ecs import ECSTask
ecs_task_block = ECSTask.load("my-ecs-task-block")
ecs_task_result = ecs_task_block.run()
print(ecs_task_result.exit_code) # 1 (application error)
s
We had the same query and ended up simply using the status code. You can stream logs back so its easier to see what went wrong, but the logs go to stdout so you cant analyse the stacks with code
s
the logs go to stdout so you cant analyse the stacks with code
Hmm, it seems difficult to solve my problem. I hope for a future feature that can detect errors. Thank you for your kind response.