File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -140,9 +140,9 @@ module.exports = function(RED) {
140
140
function createDatabase ( cloudant , node ) {
141
141
cloudant . db . list ( function ( err , all_dbs ) {
142
142
if ( err ) {
143
- if ( err . error !== 'forbidden' ) {
144
- // if err.error is 'forbidden' then we are using an api
145
- // key, so we can assume the database already exists
143
+ if ( err . status_code === 403 ) {
144
+ // if err.status_code is 403 then we are probably using
145
+ // an api key, so we can assume the database already exists
146
146
return ;
147
147
}
148
148
node . error ( "Failed to list databases: " + err . description , err ) ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " node-red-node-cf-cloudant" ,
3
- "version" : " 0.2.13 " ,
3
+ "version" : " 0.2.14 " ,
4
4
"description" : " A Node-RED node to access a Cloudant database on Bluemix" ,
5
5
"dependencies" : {
6
6
"cfenv" : " 1.0.0" ,
You can’t perform that action at this time.
0 commit comments