Skip to main content
Solved

Issue Handling Webhooks with Empty Body in FME Flow

  • November 24, 2025
  • 3 replies
  • 30 views

arild_f
Contributor
Forum|alt.badge.img+5

Hello FME Community,

I’ve encountered an issue in FME Flow and would appreciate your input.

We have an automation webhook that receives messages from another system and then triggers a workspace. The source system is a building management system used by our real estate department. It sends a message whenever a new building is added or an existing building is updated, and this works perfectly.

However, the problem occurs when a building is deleted. The delete message contains data only in the header and nothing in the body. As a result, FME Flow returns a 400 Bad Request error with the following output: {"message": "JSON Parse Error: Unable to read message body"}.

The error goes away if I add {} in the body in Postman and then send the message to Flow.

I’ve spoken with the administrator of the building management system about the possibility of including {} in the body, but unfortunately, that’s not an option.

 

Question:
Is there a way to configure FME Flow to accept a webhook with an empty body?

 

We are currently running FME Flow 2025.1.1.

Thank you for any suggestions!

Best answer by virtualcitymatt

The problem is happening before the data even enter the FME ecosystem so there's not much he can do on the FME side. 

Perhaps some middleware to add a {} in case its empty? Sees a little unnecessary. 

How's the request being sent? If it's with curl it should be easy enough to just set an empty body to {}.

It does seem like a bit of a limitation that the POST must have a body. 

3 replies

geomancer
Evangelist
Forum|alt.badge.img+60
  • Evangelist
  • November 24, 2025

Can you add the {} in the body yourself when it is needed, before processing the JSON data?

Like this: Process the input as text (setting parameter Read Whole File at Once to 'Yes’), add {} in the body when needed (maybe using StringReplacer in mode 'Replace Regular Expression’), and process the result as JSON like you already do.


virtualcitymatt
Celebrity
Forum|alt.badge.img+47
  • Celebrity
  • Best Answer
  • November 25, 2025

The problem is happening before the data even enter the FME ecosystem so there's not much he can do on the FME side. 

Perhaps some middleware to add a {} in case its empty? Sees a little unnecessary. 

How's the request being sent? If it's with curl it should be easy enough to just set an empty body to {}.

It does seem like a bit of a limitation that the POST must have a body. 


virtualcitymatt
Celebrity
Forum|alt.badge.img+47

Does the Webhook Trigger node output a failed feature in the case of this 400 response? That would be nice. The doc suggest that it should, but in my testing in the past I didn't see that happen