additional exception checking in storage-read
This commit is contained in:
@ -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": {
|
||||||
|
|||||||
@ -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));
|
||||||
|
|||||||
Reference in New Issue
Block a user