-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write with Overwrite = true fails if doc doesn't exist #112
Comments
#110 is a related issue. |
Here's a rough golang version that works as I would expect in terms of writing a new doc or overwriting an existing doc |
vipulkashyap111
pushed a commit
to vipulkashyap111/incubator-openwhisk-package-cloudant
that referenced
this issue
Feb 5, 2018
rabbah
pushed a commit
that referenced
this issue
Feb 7, 2018
#155) If document is not present when overwrite is requested, then insert it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you do a write with
--param overwrite 'true'
on a non-existent doc id:it gives an error:
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.The text was updated successfully, but these errors were encountered: