Hello, I would like to raise a feature request to ...
# prefect-community
h
Hello, I would like to raise a feature request to allow ShellTask to return stdout when it fails.
https://github.com/PrefectHQ/prefect/issues/3614
please see this link or the thread for the details
The probem Sometime, the downstream task need to interpret the output of a failed shell task (might be from both stdout and stderr) to handle the the failure properly. In my use case, I use DBTShellTask (which is a subclass of ShellTask) for execute a 
dbt run
 as shell sub-process. I then use another task, called 
parse_dbt_result
, to take the output of the dbt task and handle both success and failure results, such as knowing which models in the dbt-run process failed. When some models fails in a 
dbt run
, those model errors are shown in the stdout, and the shell subprocess returns non-zero exit code (1). The ShellTask raises a FAIL signal without any stdout result. As a result, the 
parse_dbt_result
 task is not able to interpret the log of failed run and not know which model fails, hereby not be able to handle the failure properly. Solution please provide a flag that allows ShellTask to return stdout(or/and stderror) result when the shell process fails and FAIL signal is raised.