Question

HTTPCaller issue with payload

  • 25 September 2019
  • 1 reply
  • 4 views

Badge

I am submitting a payload to the HTTPCaller and in most circumstances it works as expected, however in some it doesnt and sens me back a 'HTTP/1.1 500 Internal Server Error as below.

HTTP/1.1 500 Internal Server Error

When I take the payload directly from the database it simply takes too long and looks like it is not being formatted correctly e.g. missing carriage returns. I believe this to be true because when I extract that payload and submit it through Insomnia directly to the end point I can recreate the issue.

To be nosey I added a Logger transformer and looked at what I was sending to the endpoint, ironically when I copied and pasted this out it was subtly different and succeeded in milliseconds! I am really confused why this would be different and what to do to remedy this.


1 reply

Userlevel 2
Badge +17

Hi @johnbyrnejb,

This is a bit of a long shot without being able to see the payload, but it may be due to the difference between Unix and Windows line endings: Unix uses just LF, while Windows uses CR+LF.

Many aspects of FME are designed to be cross-platform, so the Logger is likely converting the Unix endings to Windows when displaying the contents of the payload. However, the HTTPCaller submits it verbatim.

Please try adding an AttributeEncoder transformer with the destination encoding set to the default 'system encoding' and the Incoming Attribute set to 'Honor Encoding' to see if this fixes the line endings for you.

Reply