I have created Node-Red App service on IBM Cloud (Both IAM and legacy authentication mechanism is selected while creating). When the Node-Red instance is created along with it a Cloudant instance is also created. I created a flow with just the Cloudant database node. The cloudant database node is configured as follows. Note that I have selected Service as "External cloudant or couchdb service":

I have updated Cloudant connection details by clicking the pencil icon against the server entry.
Now when I deploy this node, I get an error message in debug window as "TypeError: Cannot read property 'match' of null".
Now, under Cloudant node configuration, I changed the service option and selected the Cloudant Instance that was created while Node-Red App instance was created. Screenshot as below.

After deploying this change, the cloudant node connects without any error.
What is the issue with connecting to external cloudant database using host/username/password? What does the error indicate?
Following are the logs when error occurs:
2020-06-29T10:54:50.81+0530 [API/4] OUT Updated app with guid b745521a-795c-4329-b48e-7409991263aa ({"state"=>"STARTED"})
2020-06-29T10:54:51.22+0530 [CELL/0] OUT Cell 3043fbb9-6cc0-4c9e-92f2-8cbc93c6e237 creating container for instance 9ff39876-673d-4195-79af-4df8
2020-06-29T10:54:53.72+0530 [CELL/0] OUT Cell abd60462-983f-4ada-90d4-cd3b63e1a665 destroying container for instance 2a6452fd-4363-42e0-56f4-95b4
2020-06-29T10:54:53.82+0530 [RTR/27] OUT node-red-tbapf.mybluemix.net - [2020-06-29T05:23:11.612387127Z] "GET /red/comms HTTP/1.1" 101 0 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36" "10.186.136.34:50859" "169.62.205.138:61162" x_forwarded_for:"49.207.200.44, 10.186.136.34" x_forwarded_proto:"https" vcap_request_id:"228e8283-8f10-4684-469f-04a2995c93f3" response_time:102.212456 gorouter_time:102.212456 app_id:"b745521a-795c-4329-b48e-7409991263aa" app_index:"0" x_global_transaction_id:"9f474cea5ef97abf0f2295bf" true_client_ip:"-" x_b3_traceid:"8b624f8e44c105b4" x_b3_spanid:"8b624f8e44c105b4" x_b3_parentspanid:"-" b3:"8b624f8e44c105b4-8b624f8e44c105b4"
2020-06-29T10:54:53.82+0530 [RTR/27] OUT
2020-06-29T10:54:53.91+0530 [CELL/0] OUT Cell 3043fbb9-6cc0-4c9e-92f2-8cbc93c6e237 successfully created container for instance 9ff39876-673d-4195-79af-4df8
2020-06-29T10:54:54.03+0530 [PROXY/0] OUT Exit status 137
2020-06-29T10:54:54.18+0530 [CELL/0] OUT Downloading droplet...
2020-06-29T10:54:56.27+0530 [CELL/0] OUT Cell abd60462-983f-4ada-90d4-cd3b63e1a665 successfully destroyed container for instance 2a6452fd-4363-42e0-56f4-95b4
2020-06-29T10:55:02.48+0530 [CELL/0] OUT Downloaded droplet (61.5M)
2020-06-29T10:55:02.48+0530 [CELL/0] OUT Starting health monitoring of container
2020-06-29T10:55:13.87+0530 [APP/PROC/WEB/0] OUT > node-red-app@1.1.1 start /home/vcap/app
2020-06-29T10:55:13.87+0530 [APP/PROC/WEB/0] OUT > node --max-old-space-size=160 index.js --settings ./bluemix-settings.js -v
2020-06-29T10:55:15.20+0530 [APP/PROC/WEB/0] OUT 29 Jun 05:25:15 - Starting Node-RED on IBM Cloud bootstrap
2020-06-29T10:55:15.20+0530 [APP/PROC/WEB/0] OUT 29 Jun 05:25:15 - Loading bluemix-settings.js
2020-06-29T10:55:15.45+0530 [APP/PROC/WEB/0] OUT 29 Jun 05:25:15 - Using Cloudant service: node-red-tbapf-cloudant-1592919092762-43583 db:noderedtbapf prefix:noderedtbapf
2020-06-29T10:55:16.16+0530 [APP/PROC/WEB/0] OUT 29 Jun 05:25:16 - Loading application settings
2020-06-29T10:55:17.22+0530 [APP/PROC/WEB/0] OUT 29 Jun 05:25:17 - Using runtime settings for adminAuth
2020-06-29T10:55:17.22+0530 [APP/PROC/WEB/0] OUT 29 Jun 05:25:17 - Enabling adminAuth security - set NODE_RED_USERNAME and NODE_RED_PASSWORD to change credentials
2020-06-29T10:55:17.23+0530 [APP/PROC/WEB/0] OUT 29 Jun 05:25:17 - Enabling anonymous read-only access - set NODE_RED_GUEST_ACCESS to 'false' to disable
2020-06-29T10:55:19.56+0530 [APP/PROC/WEB/0] OUT 29 Jun 05:25:19 - [info]
2020-06-29T10:55:19.56+0530 [APP/PROC/WEB/0] OUT Welcome to Node-RED
2020-06-29T10:55:19.56+0530 [APP/PROC/WEB/0] OUT ===================
2020-06-29T10:55:19.59+0530 [APP/PROC/WEB/0] OUT 29 Jun 05:25:19 - [info] Node-RED version: v1.0.6
2020-06-29T10:55:19.60+0530 [APP/PROC/WEB/0] OUT 29 Jun 05:25:19 - [info] Node.js version: v12.18.0
2020-06-29T10:55:19.61+0530 [APP/PROC/WEB/0] OUT 29 Jun 05:25:19 - [info] Linux 4.15.0-106-generic x64 LE
2020-06-29T10:55:20.70+0530 [APP/PROC/WEB/0] OUT 29 Jun 05:25:20 - [info] Loading palette nodes
2020-06-29T10:55:26.86+0530 [APP/PROC/WEB/0] OUT 29 Jun 05:25:26 - [warn] Missing node modules:
2020-06-29T10:55:26.88+0530 [APP/PROC/WEB/0] OUT 29 Jun 05:25:26 - [warn] - node-red-node-email (1.7.8): e-mail, e-mail in
2020-06-29T10:55:26.88+0530 [APP/PROC/WEB/0] OUT 29 Jun 05:25:26 - [info] Settings file : /home/vcap/app/bluemix-settings.js
2020-06-29T10:55:26.90+0530 [APP/PROC/WEB/0] OUT 29 Jun 05:25:26 - [info] HTTP Static : /home/vcap/app/public
2020-06-29T10:55:26.91+0530 [APP/PROC/WEB/0] OUT 29 Jun 05:25:26 - [info] Context store : 'default' [module=memory]
2020-06-29T10:55:26.93+0530 [APP/PROC/WEB/0] OUT 29 Jun 05:25:26 - [info] Installing module: node-red-node-email, version: 1.7.8
2020-06-29T10:55:27.51+0530 [APP/PROC/WEB/0] OUT 29 Jun 05:25:27 - [info] Server now running at http://127.0.0.1:8080/red/
2020-06-29T10:55:27.64+0530 [APP/PROC/WEB/0] OUT 29 Jun 05:25:27 - [warn]
2020-06-29T10:55:27.64+0530 [APP/PROC/WEB/0] OUT ---------------------------------------------------------------------
2020-06-29T10:55:27.64+0530 [APP/PROC/WEB/0] OUT Your flow credentials file is encrypted using a system-generated key.
2020-06-29T10:55:27.64+0530 [APP/PROC/WEB/0] OUT If the system-generated key is lost for any reason, your credentials
2020-06-29T10:55:27.64+0530 [APP/PROC/WEB/0] OUT file will not be recoverable, you will have to delete it and re-enter
2020-06-29T10:55:27.64+0530 [APP/PROC/WEB/0] OUT your credentials.
2020-06-29T10:55:27.64+0530 [APP/PROC/WEB/0] OUT You should set your own key using the 'credentialSecret' option in
2020-06-29T10:55:27.64+0530 [APP/PROC/WEB/0] OUT your settings file. Node-RED will then re-encrypt your credentials
2020-06-29T10:55:27.64+0530 [APP/PROC/WEB/0] OUT file using your chosen key the next time you deploy a change.
2020-06-29T10:55:27.64+0530 [APP/PROC/WEB/0] OUT ---------------------------------------------------------------------
2020-06-29T10:55:27.72+0530 [APP/PROC/WEB/0] OUT 29 Jun 05:25:27 - [info] Starting flows
2020-06-29T10:55:27.86+0530 [APP/PROC/WEB/0] OUT 29 Jun 05:25:27 - [error] [cloudant in:a41c2d3d.3738f] TypeError: Cannot read property 'match' of null
2020-06-29T10:55:27.86+0530 [APP/PROC/WEB/0] OUT at module.exports (/home/vcap/deps/0/node_modules/cloudant/lib/reconfigure.js:23:25)
2020-06-29T10:55:27.86+0530 [APP/PROC/WEB/0] OUT at Cloudant (/home/vcap/deps/0/node_modules/cloudant/cloudant.js:47:19)
2020-06-29T10:55:27.86+0530 [APP/PROC/WEB/0] OUT at new CloudantInNode (/home/vcap/deps/0/node_modules/node-red-node-cf-cloudant/77-cloudant-cf.js:246:9)
2020-06-29T10:55:27.86+0530 [APP/PROC/WEB/0] OUT at Object.createNode (/home/vcap/deps/0/node_modules/@node-red/runtime/lib/nodes/flows/util.js:483:31)
2020-06-29T10:55:27.86+0530 [APP/PROC/WEB/0] OUT at Flow.start (/home/vcap/deps/0/node_modules/@node-red/runtime/lib/nodes/flows/Flow.js:193:48)
2020-06-29T10:55:27.86+0530 [APP/PROC/WEB/0] OUT at start (/home/vcap/deps/0/node_modules/@node-red/runtime/lib/nodes/flows/index.js:345:33)
2020-06-29T10:55:27.86+0530 [APP/PROC/WEB/0] OUT at processTicksAndRejections (internal/process/task_queues.js:97:5)
2020-06-29T10:55:27.89+0530 [APP/PROC/WEB/0] OUT 29 Jun 05:25:27 - [info] Started flows
2020-06-29T10:55:28.34+0530 [CELL/0] OUT Container became healthy
2020-06-29T10:55:31.86+0530 [APP/PROC/WEB/0] OUT 29 Jun 05:25:31 - [audit] {"event":"comms.open","level":98,"timestamp":1593408331862}
2020-06-29T10:55:32.09+0530 [APP/PROC/WEB/0] OUT 29 Jun 05:25:32 - [audit] {"event":"comms.auth.fail","level":98,"timestamp":1593408332091}
2020-06-29T10:55:32.42+0530 [RTR/8] OUT node-red-tbapf.mybluemix.net - [2020-06-29T05:25:31.319324438Z] "GET /red/comms HTTP/1.1" 101 0 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36" "10.171.2.123:50196" "169.61.185.57:61162" x_forwarded_for:"49.207.200.44, 10.171.2.123" x_forwarded_proto:"https" vcap_request_id:"6033e5f0-32d9-4fe1-5a89-5a12b29b6552" response_time:1.106342 gorouter_time:1.106342 app_id:"b745521a-795c-4329-b48e-7409991263aa" app_index:"0" x_global_transaction_id:"64e02e055ef97b4b635514ed" true_client_ip:"-" x_b3_traceid:"499eded398546dd7" x_b3_spanid:"499eded398546dd7" x_b3_parentspanid:"-" b3:"499eded398546dd7-499eded398546dd7"
2020-06-29T10:55:32.42+0530 [RTR/8] OUT
2020-06-29T10:55:32.46+0530 [APP/PROC/WEB/0] OUT 29 Jun 05:25:32 - [audit] {"event":"comms.close","user":null,"session":"mHZzTJr3ZeNL0k0vvBcgdzgYj5iiUaFS","level":98,"timestamp":1593408332466}
2020-06-29T10:55:32.77+0530 [RTR/9] OUT node-red-tbapf.mybluemix.net - [2020-06-29T05:25:32.397373879Z] "GET /red/auth/login HTTP/1.1" 304 0 0 "https://node-red-tbapf.mybluemix.net/red/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36" "10.171.2.125:55074" "169.61.185.57:61162" x_forwarded_for:"49.207.200.44, 10.171.2.125" x_forwarded_proto:"https" vcap_request_id:"77ed0682-6048-4a13-5d63-5d592fc7d031" response_time:0.374570 gorouter_time:0.000384 app_id:"b745521a-795c-4329-b48e-7409991263aa" app_index:"0" x_global_transaction_id:"5c3f3acf5ef97b4cf152680f" true_client_ip:"-" x_b3_traceid:"9b26ff380f3a144a" x_b3_spanid:"9b26ff380f3a144a" x_b3_parentspanid:"-" b3:"9b26ff380f3a144a-9b26ff380f3a144a"
2020-06-29T10:55:32.77+0530 [RTR/9] OUT
Thank you.