additional exception checking in storage-read

This commit is contained in:
Peter Svensson
2019-07-15 15:38:30 +02:00
parent ca92bc0617
commit e43f270257
2 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "node-red-contrib-firebase-admin", "name": "node-red-contrib-firebase-admin",
"version": "1.1.5", "version": "1.1.6",
"description": "A node-red module that wraps the server-side admin SDK of firebase, firestore, et.c.", "description": "A node-red module that wraps the server-side admin SDK of firebase, firestore, et.c.",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -13,6 +13,7 @@ module.exports = function(RED) {
this.storage = c.storage this.storage = c.storage
this.bucket = config.bucket || c.bucket this.bucket = config.bucket || c.bucket
this.path = config.path this.path = config.path
console.log('storage-read set this.storage')
} }
//console.log('configuring storage-read to listen for messages') //console.log('configuring storage-read to listen for messages')
@ -44,7 +45,7 @@ module.exports = function(RED) {
}) })
})(_file) })(_file)
}) })
} else { } else if(msg){
console.log('* reading single file from path '+path) console.log('* reading single file from path '+path)
try{ try{
this.storage this.storage
@ -63,7 +64,8 @@ module.exports = function(RED) {
console.log('storage-read caught exception: '+ex) console.log('storage-read caught exception: '+ex)
node.send(msg) node.send(msg)
} }
} else {
console.log('----- storage-read ignoring empty message!')
} }
} }
}.bind(this)); }.bind(this));