Payload length limitation, base64

Hi all

My Node-RED setup contains a GET request from an OpenAPI service, that returns a base64 string. The returned base64 string doesn´t return the complete string (compared with same request in Postman), ending with "...". Is there a limit for the length of the string in Node-RED - and is there a workaround I can read on?

Thanks.

There is limit to what will be displayed in the debug sidebar, but the msg object will contain the full response.

The limit is mainly for performance reasons as it need to to be streamed from the backend to the editor over Websockets.

You have 2 choices

  1. Set the debug node to output to the console as well as the sidebar, this output will always contain the full message.
  2. You can change the limit in the settings.js but to be honest I really wouldn't change this. You would change the debugMaxLength: 1000 value and restart node-red.

@hardillb, spot on. It works. Thank´s for the help. A question. Should I be worried, when setting the debugMaxLength to around 100000? I know that it will occur in my setup.

There should be no need to set it it is ONLY for debug for you to look at. Are you really going to be visually inspecting them by eye ? The actual messages in the flow on the server are not affected.

1 Like

I don't recommend doing this. You will slow down node-red and your browser as it attempts to (pointlessly) send & render 100000 characters that you have no hope of inspecting.

If you have a need to occasionally inspect the full payload of a 100000 characters, I suggest you either send it to file or the console.

1 Like

I´m parsing the payload, so therefore the reason. I might be missing something here from @hardillb - as in using the console :

The console, I rarely work with - I´m strictly working in the GUI. I just want to parse the full response for a insert into database with postgrestor node.

The whole message gets passed to the next node. It’s only the debug visualisation that is truncated. The parser will get it all no matter how you set that value. After all you don’t need to have the debug there for it to work.

1 Like

That makes sense. Thanks for the info.

Noted. Thx.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.