web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / actions for Error Hand...
Power Automate
Answered

actions for Error Handling not working after Update a Row

(1) ShareShare
ReportReport
Posted on by 938
Hi All - I have an append to array variable set to get the message for a failed Update a Row (Dataverse)  action  in PA. for some reason it will not capture the error message.  I've used actions successfully in other areas - has anyone ever seen this before?   What did I miss.
 
Thank you 
 
actions('Update_a_row_Header')?['error']?['message']
 
 
Categories:
I have the same question (0)
  • Suggested answer
    Haque Profile Picture
    3,653 on at
    Hi @ctedesco3307,
     
    Can you please try this: 
    coalesce(actions('Update_a_row_Header')?['error']?['message'], '')
     
     
    When you are using Append to array variable action, let's see what is happening in the flow. The  Append to array variable action is trying to add the error message from actions('Update_a_row_Header')?['error']?['message'], but when that action succeeds (or fails differently), the path can resolve to null
     
    The error is clearly mentioned in the error message:
     
    As it is inside the Apply to each loop, an If condition will be bti expensive, if it is not that, you can try one more option:
     
     
     
    if(
       empty(actions('Update_a_row_Header')?['error']?['message']),
       null,
       actions('Update_a_row_Header')?['error']?['message']
    )
    

     
    But I prefere first one, null check with coalesce function.
     

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!
  • Suggested answer
    11manish Profile Picture
    3,333 on at
    Your “Append to array variable” action is NOT configured to run after failure
    Fix 
    • Configure “Run After”
    • On your Append to array variable action:
      • Click … (three dots)
    • Select:
    • Configure run after
    • Enable:
      • Has failed
      • Has timed out (optional)
     
    Thanks
    Manish
     
     
  • ctedesco3307 Profile Picture
    938 on at
    @hague I tried the coalesce, it  didn't fail the append to array action but it did not capture my error message. The error message is there and I want to capture it to send in an email. The If statement gave me the same Bad Request error message. 
  • Verified answer
    Haque Profile Picture
    3,653 on at
    Hi @ctedesco3307,
     
    Ah! I am sorry! It seems coalesce() solved the null-append problem, unfortunately masked actual error message because of how the expression is being evaluated. The key detail is that actions('Update_a_row_Header')?['error']?['message'] only exists when the action fails. If the action succeeds, that path is empty, and coalesce() falls back to '' (empty string).
     
    We hvae two options to address this:
     
    1. Use the outputs() object instead of actions(): 
    coalesce(outputs('Update_a_row_Header')?['body/error/message'], '')
    Note: This digs into the body of the failed action where the error message is actually stored
     
     
    2. Use result() to capture failures - PA has a result() function that always returns the full run result of an action (including errors).
    coalesce(result('Update_a_row_Header')?['error']?['message'], '')
    Note: This is more reliable than actions() when you want to log errors.
     
     
     
    I would suggest if can add a condtion as a safe guard - that is append only when failed. So the Condition will check if the status is failed or not. We can do this like: @equals(actions('Update_a_row_Header')?['status'], 'Failed')
     
    If it is true - do the append (step-1 or step-2) else skip.
     
     

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!

     

     
  • ctedesco3307 Profile Picture
    938 on at
    @hauge  
     
    this one worked!  Thank you
     
    coalesce(outputs('Update_a_row_Header')?['body/error/message'], '')

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard