You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Jan Lehnardt (JIRA)" <ji...@apache.org> on 2011/04/16 23:34:05 UTC

[jira] [Resolved] (COUCHDB-1104) POST on a doc with the wrong id gives an obtuse error

     [ https://issues.apache.org/jira/browse/COUCHDB-1104?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan Lehnardt resolved COUCHDB-1104.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.2

This has been fixed in trunk a while ago.

> POST on a doc with the wrong id gives an obtuse error
> -----------------------------------------------------
>
>                 Key: COUCHDB-1104
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1104
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.0.2
>         Environment: Linux
>            Reporter: Thomas Vander Stichele
>            Priority: Minor
>             Fix For: 1.2
>
>
> Had this problem during a couchdb training.
> [thomas@otto ~]$ curl -X GET http://localhost:5984/bank/_all_docs{"total_rows":5,"offset":0,"rows":[
> {"id":"fe4a1382596a9071d66412f9f100183c","key":"fe4a1382596a9071d66412f9f100183c","value":{"rev":"1-1e3f1ca41010f7cc641337fa3ea88593"}},
> {"id":"fe4a1382596a9071d66412f9f1001c67","key":"fe4a1382596a9071d66412f9f1001c67","value":{"rev":"1-ea8b064f341943d19776e63201b6d0c4"}},
> {"id":"fe4a1382596a9071d66412f9f1002209","key":"fe4a1382596a9071d66412f9f1002209","value":{"rev":"1-1c8d66f0baf7b022a63d62b99db5f133"}},
> {"id":"fe4a1382596a9071d66412f9f1002da8","key":"fe4a1382596a9071d66412f9f1002da8","value":{"rev":"2-2d03d5121b4df02423cece5432de16cc"}},
> {"id":"fe4a1382596a9071d66412f9f100388a","key":"fe4a1382596a9071d66412f9f100388a","value":{"rev":"1-e194aaf299e9ac452d2db072584271f6"}}
> ]}
> [thomas@otto ~]$ curl -X PUT -H "Content-Type:image/jpeg"  "http://localhost:5984/bank/fe4a1382596a9071d66412f9f100183c/picture.jpg?rev=2-2d03d5121b4df02423cece5432de16cc" --data-binary @ik/thomasvs.jpg 
> {"error":"{not_found,missing}","reason":"{2,<<45,3,213,18,27,77,240,36,35,206,206,84,50,222,22,204>>}"}
> [thomas@otto ~]$ curl -X PUT -H "Content-Type:image/jpeg"  "http://localhost:5984/bank/fe4a1382596a9071d66412f9f100183c/picture.jpg?rev=1-1e3f1ca41010f7cc641337fa3ea88593" --data-binary @ik/thomasvs.jpg 
> {"ok":true,"id":"fe4a1382596a9071d66412f9f100183c","rev":"2-650721e13f38e481e1839525cf0caa56"}
> The second command (first put) gives an unreadable reason.  The reason is I supplied a non-existing revid for that doc.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira