From 245b9248c2456f974906bfc280a7db7e090f2a43 Mon Sep 17 00:00:00 2001 From: Eric Fernandez Date: Thu, 29 Aug 2019 10:55:47 -0300 Subject: [PATCH] =?UTF-8?q?paso=20c=C3=B3digo=20como=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/index.js | 4 +++- index.js | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/data/index.js b/data/index.js index b72bac8..7ff8929 100644 --- a/data/index.js +++ b/data/index.js @@ -141,7 +141,9 @@ module.exports = function(config) { }); }) - .catch(reject); + .catch(() => { + reject(510); + }); }); } diff --git a/index.js b/index.js index d4464a4..563a7eb 100644 --- a/index.js +++ b/index.js @@ -36,6 +36,7 @@ client.on('open', function open() { client.send(JSON.stringify(message)); }).catch((ee) => { console.log('no se guardó' + ee); + message.code = ee; message.ok = 0; client.send(JSON.stringify(message)); }); -- 1.9.1