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

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Bug report: 202 and 20...
Power Apps
Unanswered

Bug report: 202 and 204 response result in error the data returned in the response is invalid

(1) ShareShare
ReportReport
Posted on by 32

Let's assume you have a REST custom connector where you have PATCH operation. When that is called from a button, it is returning 202OK (also tested with 204) and error 'The data returned in the response is invalid' is showed in PowerApps.

 

Exactly the same service from the connector works in Flow. It seems that PowerApps care about the response and do not like 202/204 status coded for PATCH/PUT operations.

 

Can you please fix it, it is annoying.

 

Thank you.

Tomas

Categories:
I have the same question (0)
  • v-micsh-msft Profile Picture
    on at
    Re: Bug report: 202 and 204 response result in error the data returned in the response is invalid

    I suspect the issue here should be caused by PowerApps can't handle the JSON data.

     

    By the way, could you please take a look to see if the 202 and 204 response has been defined under the Response part when creating the Custom Connector in PowerApps?

    Connector definition

    If the corresponding response has been defined, then it should be available for PowerApps to handle the response.

     

    For the current situation, please consider take use of Send Response to PowerApps with Microsoft Flow as a workaround.

     

    Regards,

    Michael

  • Community Power Platform Member Profile Picture
    on at
    Re: Bug report: 202 and 204 response result in error the data returned in the response is invalid

    Hi @v-micsh-msft 

     

    Is there any instructions how to define 202 and 204 responses in my custom connector?

  • CU28111156-0 Profile Picture
    32 on at
    Re: Bug report: 202 and 204 response result in error the data returned in the response is invalid

    we have webAPI with openAPI sitting in the backend, in there teh swagger will read annotations on the controller combined with the function. Connector will read this information when you will create it from OpenAPI file or OpenAPI Url. OpenAPI is generated by Swagger/Swaschbuckle.

     

    Tomas

  • gilad Profile Picture
    6 on at
    Re: Bug report: 202 and 204 response result in error the data returned in the response is invalid

    You can solve the problem by adding header to the request in the connector:


    prefer:return=representation

     

    you will get respond 201. It solved the problem for me.

     

    For additional information see: https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/webapi/compose-http-requests-handle-errors

     

    Gilad

  • CU28111156-0 Profile Picture
    32 on at
    Re: Bug report: 202 and 204 response result in error the data returned in the response is invalid

    Thank you, I will try that.

  • echapa Profile Picture
    2 on at
    Re: Bug report: 202 and 204 response result in error the data returned in the response is invalid

    You're amazing, this worked! I guess I spoke too soon. I'm still getting a 204 response with graph even after using the Prefer: return=representation Header.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard