Forum Discussion

Peter_23's avatar
Peter_23
Icon for Advocate V rankAdvocate V
1 year ago
Solved

How actually works fail activity

Hi community, I developed a pipeline with simple estructure:  The notebook activy trigger the fail activity, but I run it, it always throw Failed Status :(,  I think it should be succeeded if the Fa...
  • v-ssriganesh's avatar
    1 year ago

    Hello Peter_23,
    Thank you for reaching out to the Microsoft Fabric Community Forum. I have reproduced your scenario in a Fabric trial workspace, and here’s what I found:

    • The Fail activity is designed to always return pipeline status = Failed (this is by design).
    • You can provide your own error message and error code to make the failure more descriptive.

    Example configuration I used:

    • Fail message: @concat('Notebook execution failed at ', string(utcNow()))
    • Error code: NotebookError

    Output when Notebook fails → Fail activity runs:

     

    So yes, it is normal for the Fail activity to mark the pipeline as Failed. The trial Fabric environment supports it. the key is that the Fail activity requires both a Fail message (string) and an Error code.

    If you instead want to capture the error without failing the pipeline, you can use alternatives like Set Variable or Append Variable activities instead of Fail.

    Hope this clarifies.

    Best Regards,
    Ganesh singamshetty.