I have a NodeRed workflow that sends HTTP Requests to an API endpoint. Each message sent must authenticate based on where it is originating. I am currently using a switch element as a case to set a variable used to set the header in the request.
This results in the dreaded “Error: Cannot set headers after they are sent to the client” if a request takes more than an instant to process.
Relevant workflow
I am currently throttling the workflow to minimize this, as well as catching the error and dumping it back into the queue.
I am unsure of creating separate workflows and using a link would help this as I don’t know if this strategy might have promise.
deninger is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.