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 Apps / Custom Connector 400 R...
Power Apps
Unanswered

Custom Connector 400 Response Body

(0) ShareShare
ReportReport
Posted on by 13

Hi All.

We have a Custom Connector calling an internal API. When I test the custom connector with bad data, the custom connector test shows the following in the body of the 400 response:

 

 

{
 "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
 "title": "One or more validation errors occurred.",
 "status": 400,
 "errors": {
 "AddressCountry": [
 "The length of 'Address Country' must be 20 characters or fewer. You entered 49 characters."
 ],
 "AddressPostalCode": [
 "The length of 'Address Postal Code' must be 10 characters or fewer. You entered 56 characters."
 ]
 }
}

 

 

Is there any way in PowerApps to get this body in a Canvas App? PowerAutomate can see it but in the Errors.Details object, the httpResponse is blank. httpCode comes across as 400. Thanks in advance!

Categories:
  • BCLS776 Profile Picture
    8,994 Moderator on at

    Using a Response or Respond to PowerApp operation in Power Automate, you can return this body to a Power App from a flow. You will need to transmit it as a string of the whole message and parse it in the app, or return portions of it as individual response parameters.

    Hope that helps,

    Bryan

  • Mattaroon Profile Picture
    13 on at

    That's not really a solution, more of a workaround though, no? Is there no way to do this PowerApps directly?

  • BCLS776 Profile Picture
    8,994 Moderator on at

    Sorry, I misunderstood. You can also call a custom connector from a Power App and receive the response directly in the app. Add the custom connector as a data source to your app and use Set() or UpdateContext() to apply the response to a variable. Make sense?

     

    Bryan

  • Mattaroon Profile Picture
    13 on at

    I'm calling the connector from the PowerApp and it's working fine when it works. When I enter bad data, though, the API throws the appropriate 400 error but I can't seem to be able to figure out how to get the response body. If I use IfError() and FirstError() to populate a collection, the httpResponse in the Details is blank but the httpCode comes in as 400. If I use Set() or UpdateContext(variable, APICALL({Parameter:1})) the variables just get set to a blank boolean. When I test my Custom Connector in the PowerPlatform interface with the same bad data I can see the response (that's the code sample I posted above).

  • BCLS776 Profile Picture
    8,994 Moderator on at

    In that case, have a look at the response parameters of the custom connector. If the schema does not match the response body, it will not get returned through the response parameters. In cases where I need to work with a wide variety of potential responses, I often configure the custom connector's response to deliver the body as a whole object and then parse/handle it within my app or flow.

     

  • russellgove Profile Picture
    9 on at

    Hey, you gust ever figure this out? My backend returns a 400 Error with a plain text message in the rersponse body. Any way to get at that?

     

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard