File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -140,9 +140,9 @@ module.exports = function(RED) {
140140 function createDatabase ( cloudant , node ) {
141141 cloudant . db . list ( function ( err , all_dbs ) {
142142 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
146146 return ;
147147 }
148148 node . error ( "Failed to list databases: " + err . description , err ) ;
Original file line number Diff line number Diff line change 11{
22 "name" : " node-red-node-cf-cloudant" ,
3- "version" : " 0.2.13 " ,
3+ "version" : " 0.2.14 " ,
44 "description" : " A Node-RED node to access a Cloudant database on Bluemix" ,
55 "dependencies" : {
66 "cfenv" : " 1.0.0" ,
You can’t perform that action at this time.
0 commit comments