Azure Logic App HTTP Action handling a 204 response

Zheng-Rong Cai 20 Reputation points
2025-03-19T07:54:57.5433333+00:00

An API I'm using returns 204 which is supposed to be a good response. But the logic app treats it as failing. Because it's failing it doesn't return a body, headers or a status.

User's image

When I compose either body, headers or statuscode, I get:

{ "responseHeaders": { "cache-control": "no-cache", "expires": "-1", "pragma": "no-cache", "x-ms-ratelimit-burst-remaining-workflow-reads": "942", "x-ms-ratelimit-remaining-workflow-download-contentsize": "61356032", "x-ms-ratelimit-time-remaining-directapirequests": "2856974" }, "responseText": "", "status": 204, "statusText": "No Content", "headers": {} }

But when I try to do Outputs.status or anything related to the Outputs of the compose it says the property does not exist or it's Null.

User's image

User's image

Anybody got experience handling 204?

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,449 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Shireesha Eeraboina 2,815 Reputation points Microsoft External Staff
    2025-03-20T07:02:35.88+00:00

    Hello Zheng-Rong Cai,

    When handling a 204 No Content response in Azure Logic Apps,  that a 204 response does not include a body. If your Logic App expects a body or headers from the response, this absence may cause confusion.

    In your case, it appears that accessing properties like Outputs.status returns null because there is no content in a 204 response. Handle this by checking if the status code is 204 and then proceed without expecting a body or headers.

    To prevent your Logic App from treating the 204 response as a failure, implement conditional checks based on the status code received.

     I hope this addresses your query. Please let me know if you need any further assistance or clarification.

     


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.