Is there any way through PowerApps to handle a No Content 204 response through the custom API? I have a custom connector set up that works perfectly and when it works it sends back an empty response and successfully completes the action. However, I am getting an invalid response error because it is expecting json back - though this method returns no content.I would like to either fix this or suppress the error so that users can't see it cause it works perfectly.
I am afraid that it might be not possible.
From this doc we know that the HTTP 204 No Content success status response code indicates that the request has succeeded, but that the client doesn't need to go away from its current page. A 204 response is cacheable by default.
Please check the doc for more details:
It's a bit silly for it to error out though since it is indeed a sucessfully completed call - it just is returning an empty body reponse.
Especially since it is Microsoft's own QnA Maker Bot Service API that is returning an empty response on QnA pair creation.
I completely agree with you bjkountz. No Content 204 needs to be handled in custom connectors.
Since its still not possible i have added it as a new idea here: https://powerusers.microsoft.com/t5/PowerApps-Ideas/Custom-connectors-needs-to-handle-No-Content-204...
@JonatanV , other folks facing the issue: I tested today by creating an API that always returns a 204 response to a Put. I was able to use this Api in a Custom Connector. I was also able to run the Test Connection and the call succeeded, as expected.
I then used it in a flow and things worked fine.
I am not able to understand exactly where you are facing this issue. Let me know how to repro and then I can help get it resolved. Else, I will mark the issue as fixed.
Continue your learning in our online communities.
Features releasing from October 2019 through March 2020
Coming to a city near you
Fill out a quick form to claim your user group badge now!
Connect, share, and learn with your peers year-round
Register by September 5 to save $200