none
ADF V2 (Email Notification - Web Activity) - How to catch Error Message for a Copy Activity

    Question

  • Email Notification is working for me for the Lookup and Stored Procedure activities but cannot get it to work for a Copy activity.

    Copy Activity - Status works but I'm unable to capture the error message. Tried many different ways.

    {"Subject":"Pipeline: @{pipeline().Pipeline}",

    "EmailBody":"

    @{activity('Copy 1').Status}                >>> this works

    @{activity('Copy 1').Error}",                >>> does not work

    @{activity('Copy 1').Output.Errors}",    >>> does not work

    "EmailTo":"@{pipeline().parameters.EmailTo}"}

    Lookup Activity  - this works

    {"Subject":"@{pipeline().Pipeline}",

    "EmailBody":"@{activity('Lookup 1').ExceptionMessage}",

    "EmailTo":"@{pipeline().parameters.EmailTo}"}

    Stored Procedure Activity    --- this works

    {"Subject":"@{pipeline().Pipeline}",

    "EmailBody":"@{activity('Stored Procedure 1').Error.Message}",

    "EmailTo":"@{pipeline().parameters.EmailTo}"}


    ml


    • Edited by zl34 Friday, August 3, 2018 6:15 PM
    Friday, August 3, 2018 1:24 PM

All replies

  • Hi,

    Please use @{activity('Copy 1').output.errors} to have another try.

    Click this link for more details on output of the copy activity.

    Thanks.

    Saturday, August 4, 2018 12:51 AM
  • It's not working yet.

    I'm not sure if it makes a difference but this copy activity is inside a ForEach Activity.


    ml


    • Edited by zl34 Monday, August 6, 2018 6:58 PM
    Monday, August 6, 2018 6:56 PM
  • Hi,

    yes, it does matter. If the copy activity in nested in a foreach activity, its output can't be referenced outside the foreach scope. 

    Thanks.

    Wednesday, August 15, 2018 1:33 AM