I'm using Azure Logic App. This is the architecture:
I have a Scope Insert Row that include an insert statement in database. I would like to send via mail the message of the exception of the insertion. For example if the Insert statement failed with Foreign key exception, i would like to send this message.
How can I refer to this error message inside the 'Send error Msg' feature?
Thanks a lot guys :)
You could set the Configure run after
value to implement it. Set the Send an email
action run after Insert row has failed
.
If the Insert action success, the send mail won't execute and if it fails the send mail would work. You could also add the run after action value like the time out or is skipped, they are all kind of exceptions.
UPDATE: If this is your error message, you could add it with @{body('Insert_row')?['message']}
in code view mode.
And here is my error message and the subject setting.