cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SrD123
New Member

Displaying error messages in body from API

Hi,

 

I have created a custom connector for an API and I'm putting together a quick power app to prove it is working.  

 

The problem I am having is that if anything is wrong with the data sent to the API it returns a 400 error code and a custom error_code: string in the body explaining the problem. The data code be fine but maybe the account is closed, or expired or suspsended. the only time you get a 200 code is when the account you are looking at is open.

 

When I test the app nothing shows as it thinks the call fail due to the 400 error but when I give over the button I can see the failed message that has been returned. 

 

Is there a way to capture the body returned from the API call and display it regardless of the error code.

 

Thanks

 

 

 

1 REPLY 1
Brad_Groux
Community Champion
Community Champion

A 400 Error code from an API means that the request was malformed, or not following the request rules. Power Automate doesn't set these rules, the API you're calling does so the reporting capabilities are limited. It can only return what the API responds with.

If you could provide an expanded screenshot of your Flow and steps, your Flow run history, and of any detailed error messages you're receiving we could likely better assist you. Also, for the best results, you may want to review How to write a good forum post.

If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION ☑️. If you find this reply helpful, please consider giving it a LIKE. Want to know more? Follow @BradGroux on Twitter, and check out my Medium blog at https://msft.engineer.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

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

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,097)