mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
XMPP node - missed error tidy on other node
This commit is contained in:
parent
be259a75fd
commit
b443e85e44
@ -163,7 +163,15 @@ module.exports = function(RED) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
xmpp.on('error', function(err) {
|
xmpp.on('error', function(err) {
|
||||||
node.error(err.stanza.name,err);
|
if (RED.settings.verbose) { node.log(err); }
|
||||||
|
if (err.hasOwnProperty("stanza")) {
|
||||||
|
if (err.stanza.name === 'stream:error') { node.error("stream:error - bad login id/pwd ?",err); }
|
||||||
|
else { node.error(err.stanza.name,err); }
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (err.errno === "ETIMEDOUT") { node.error("Timeout connecting to server",err); }
|
||||||
|
else { node.error(err.errno,err); }
|
||||||
|
}
|
||||||
node.status({fill:"red",shape:"ring",text:"error"});
|
node.status({fill:"red",shape:"ring",text:"error"});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -225,5 +233,4 @@ module.exports = function(RED) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
RED.nodes.registerType("xmpp out",XmppOutNode);
|
RED.nodes.registerType("xmpp out",XmppOutNode);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name" : "node-red-node-xmpp",
|
"name" : "node-red-node-xmpp",
|
||||||
"version" : "0.1.1",
|
"version" : "0.1.2",
|
||||||
"description" : "A Node-RED node to talk to an XMPP server",
|
"description" : "A Node-RED node to talk to an XMPP server",
|
||||||
"dependencies" : {
|
"dependencies" : {
|
||||||
"simple-xmpp" : "1.3.*"
|
"simple-xmpp" : "1.3.*"
|
||||||
|
Loading…
Reference in New Issue
Block a user