Can't solve "ReferenceError: err is not defined"

Hello team,

I've been facing a problem for several weeks now that I can't seem to solve.
I am using npm 6.14.8, nodeJS 12.19.0 and Node Red v1.2.2.

I am not an expert on Node Red and I am trying to run a simple scenario. Send an http request via NTLM*(node-red-contrib-http-ntlm-req)* authentication protocol and display the response. The problem is that I get an error in the debug window ("ReferenceError: err is not defined") and no response from the request (qualified on Postman).

The complete error message :

Can you help me to understand the origin of this problem?
Thank you in advance.


Looks like a bug in the node (using err.message)...

You should raise an issue on that repository.

However, looking further up that code, you will see it expects method to contain '0' or '1'

Looking a little further up, it shows...

                    switch (msg.method) {
						case 'GET':
							method = '0';
						case 'POST':
							method = '1';

In other words - did you set msg.method to "GET" or "POST" or something else?

Thank you for your reply @Steve-Mcl which helped me a lot.

I did forgot to set msg.method and that solved the issue.
I have a second question, maybe you can help me. Do you know how to import/upload a CA Certificate ? It would help me to specify it before the node "http-ntlm-req" and hopefully remove the "unable to get local issuer certificate" error .

Thanks again.

No, sorry, I have never used that node.

Either start a new thread (with appropriate title to attract the correct members) OR raise an issue on the repository for the author to instruct you.

e.g. Can’t solve “ReferenceError: err is not defined” is not a good title. I had no idea of the subject.

A title like "unable to get local issuer certificate: node-red-contrib-http-ntlm-req" tells passers by that you have an error, that it is related to certificates & the name of node you are using.

Fine, thanks again for your help.

Have a good day.

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