Skip to main content

In few cases I am getting 204 No Content from the source where the Payload is Empty. in that case I need to stop the flow which is a negative path. How to achieve this? I have tried multiple things but cant resolve empty payload assignment as a JSON file.

4 respuestas
  1. 26 feb 2024, 13:58

    Hi Neha ,

    its' known behavior in mulesoft 4 , same behaviour we can observe with GET request with having header content-type as application/json .If you try to access the payload in any form ( like isEmpty or sizeOF) it will fail . In your case please go with status code 204 cheeck ( if 204 just stop the execution) , as payload will be blank allways for status code 204 (as per the REST standards). Just to avoid parsing exception for next transformation - just update payload as empty object ({}}) or empty Array [] .

0/9000