1
0
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:
Dave Conway-Jones 2016-01-29 18:06:42 +00:00
parent be259a75fd
commit b443e85e44
2 changed files with 10 additions and 3 deletions

View File

@ -163,7 +163,15 @@ module.exports = function(RED) {
});
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"});
});
@ -225,5 +233,4 @@ module.exports = function(RED) {
});
}
RED.nodes.registerType("xmpp out",XmppOutNode);
}

View File

@ -1,6 +1,6 @@
{
"name" : "node-red-node-xmpp",
"version" : "0.1.1",
"version" : "0.1.2",
"description" : "A Node-RED node to talk to an XMPP server",
"dependencies" : {
"simple-xmpp" : "1.3.*"