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)); });