additional exception checking in storage-read
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "node-red-contrib-firebase-admin",
|
||||
"version": "1.1.4",
|
||||
"version": "1.1.5",
|
||||
"description": "A node-red module that wraps the server-side admin SDK of firebase, firestore, et.c.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@ -45,7 +45,8 @@ module.exports = function(RED) {
|
||||
})(_file)
|
||||
})
|
||||
} else {
|
||||
console.log('reading single file from path '+path)
|
||||
console.log('* reading single file from path '+path)
|
||||
try{
|
||||
this.storage
|
||||
.bucket(bucket)
|
||||
.file(path).download().then((file)=>{
|
||||
@ -58,6 +59,11 @@ module.exports = function(RED) {
|
||||
msg.payload = undefined
|
||||
node.send(msg)
|
||||
})
|
||||
} catch(ex){
|
||||
console.log('storage-read caught exception: '+ex)
|
||||
node.send(msg)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}.bind(this));
|
||||
|
||||
Reference in New Issue
Block a user