tleyden opened a new issue #112: Write with Overwrite = true fails if doc doesn't exist URL: https://github.com/apache/incubator-openwhisk-package-cloudant/issues/112 If you do a write with `--param overwrite 'true' ` on a non-existent doc id: ``` wsk action invoke cloudant/write --blocking --result --param overwrite 'true' --param doc '{"foo": "bar", "_id": "nonexistent_docid"}' ``` it gives an error: ``` "stack": "Error: missing\n at Request._callback (/nodejsAction/node_modules/cloudant-nano/lib/nano.js:247:15)\n at Request.self.callback (/nodejsAction/node_modules/request/request.js:186:22)\n at emitTwo (events.js:106:13)\n at Request.emit (events.js:191:7)\n at Request.<anonymous> (/nodejsAction/node_modules/request/request.js:1081:10)\n at emitOne (events.js:96:13)\n at Request.emit (events.js:188:7)\n at IncomingMessage.<anonymous> (/nodejsAction/node_modules/request/request.js:1001:12)\n at IncomingMessage.g (events.js:291:16)", "statusCode": 404 ``` But if I remove the `--param overwrite 'true'`, it works. And then subsequent writes with `--param overwrite 'true'` succeed and update the revision. In this case, I think it's safe to ignore the 404 error trying to do the `GET` to fetch the existing revision, since it's expected that it might be the first revision, and no existing revisions exist. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
With regards, Apache Git Services
