node-red-contrib-model-asset-exchange
node-red-contrib-model-asset-exchange copied to clipboard
Nodes cannot handle JSON input
During some random testing I've noticed that if JSON is passed in as input the following error message is displayed in the debug window:
TypeError: source.on is not a function
To recreate:
- import any sample flow
- choose a JSON document as input
Would the desired behavior be a more descriptive error message, or to be able to submit JSON as input in the case of text-based models?
My assumption is that the latter case would work if the JSON was contained in msg.payload
but would need some extra processing if we wanted to be able to parse the JSON and detect input values.
Well, I expected that the node [backend] would reject the invalid payload with HTTP code 400, but somehow something blows up during node-red processing, raising this error.