cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ShawnKeeneTF
Advocate I
Advocate I

Ignore Certain Errors

I have a flow setup that sends out a reminder to users if they have any sharepoint items due on the current day (the flow runs at 5am daily). It sends out these reminders via the Flow Bot on MS Teams chat.

 

It works okay, but I get a failure notice each day because one user has blocked the flow bot.  That's entirely the user's choice, if they don't want to interact with the bot I'm not here to change their mind. But I would like to stop the email alerts telling me about a failure due to this situation. The actual error is:

 

Request to the Bot framework failed with error: '{"error":{"code":"ConversationBlockedByUser","message":"User blocked the conversation with the bot."}}'.

So, can I ignore this type of failure so I'm not seeing false-alarm notices every day?

1 ACCEPTED SOLUTION

Accepted Solutions

Hey @ShawnKeeneTF 

If the only action in the loop is the 'Teams post message' then could simply drop the terminate outside of the loop assuming you're not concerned about being notified of general issues.

1.png

 

If you need to handle the errors alittle more gracefully, you could do something similar to... but pls check the property the error is contained within from the Teams action (it might not be the body)

5.png

 

HTH

Jay

View solution in original post

10 REPLIES 10
Jay-Encodian
Community Champion
Community Champion

Hey @ShawnKeeneTF

Have you considered using the 'Run after' options to control error handling?

More details here: https://blog.encodian.com/2019/06/error-handling-in-microsoft-flow/

1.png

 

2.png

 In the branch handling the failure you could also add a condition to handle specific errors

HTH

Jay

-------------------------------------------------------------------------

If I have answered your question, please mark your post as Solved.

If you like my response, please give it a Thumbs Up

It looks like that would try to the message as the flow bot, then check to see if it failed. But if it had failed, wouldn't the error message already be thrown because the post-a-message had already been attempted?

Hi @ShawnKeeneTF 

The run-after configuration allows you to control flow when an action generates an error... in the example I showed you can see even though the action error-ed I can manually record the flow as successfully completing.

Have you tried this suggestion?

Jay

I ran into a snag trying to implement it.  It says I can't put that control into the "apply to each" area.  But it seems like it must go there, because some of those will succeed (only some fail).

 

control.png

Hey @ShawnKeeneTF 

If the only action in the loop is the 'Teams post message' then could simply drop the terminate outside of the loop assuming you're not concerned about being notified of general issues.

1.png

 

If you need to handle the errors alittle more gracefully, you could do something similar to... but pls check the property the error is contained within from the Teams action (it might not be the body)

5.png

 

HTH

Jay

View solution in original post

Thanks Jay, I'll try the former option first, it should be perfect for this situation. Thanks a ton.

Will the loop continue to run, though @Jay-Encodian? If the error occurs in the Apply to Each action halfway through, will the loop skip over the user(s) who blocked the bot and continue to notify others if their SharePoint item is due?

 

I have almost the exact same flow as you  @ShawnKeeneTF and the exact same issue : ) . User A has blocked the bot. Anyone who comes before User A in the Apply to Each action gets the notification. When the action gets to User A, the flow errors out and is terminated. All users that would have come after User A do not get the notification.

 

Any insight would be greatly appreciated!

I didn't think it stopped the loop from running, although that was just an assumption on my part. I thought that any following users that hadn't blocked the bot would still receive their reminder.

Hi @bm5tev3 

No, the loop should not stop executing.

Have you tried?

The flow has been running, but the user who blocked the flow bot and caused the action to fail has been coming through last in each of the runs this week 😅. I'll test it by changing the sort order and get back to you. Thanks!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and more.

Users online (2,554)