You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "Jonathan Hall (JIRA)" <ji...@apache.org> on 2017/04/06 00:52:41 UTC

[jira] [Created] (COUCHDB-3361) 500 instead of 412 when uploading attachment with invalid rev

Jonathan Hall created COUCHDB-3361:
--------------------------------------

             Summary: 500 instead of 412 when uploading attachment with invalid rev
                 Key: COUCHDB-3361
                 URL: https://issues.apache.org/jira/browse/COUCHDB-3361
             Project: CouchDB
          Issue Type: Bug
            Reporter: Jonathan Hall


To reproduce:

Create a database 'foo', then issue this curl command (adjusting port number, etc, as appropriate, of course):

curl -v -X PUT http://admin:abc123@localhost:6001/foo/foo/foo.txt?rev=5-967a00dff5e02add41819138abb3284d -H "Content-Type: text/plain" -d "Foo test"

Result:

< HTTP/1.1 500 Internal Server Error
{"error":"{not_found,missing}","reason":"{5,<<150,122,0,223,245,224,42,221,65,129,145,56,171,179,40,77>>}"}

Expected:

Probably a 412 error.  Possibly a 404 (to match the "error" value--if that somehow actually makes sense).

And a less cryptic error message! :)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)