Return-Path: Delivered-To: apmail-incubator-couchdb-dev-archive@locus.apache.org Received: (qmail 32379 invoked from network); 16 Apr 2008 11:06:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Apr 2008 11:06:29 -0000 Received: (qmail 3445 invoked by uid 500); 16 Apr 2008 11:06:30 -0000 Delivered-To: apmail-incubator-couchdb-dev-archive@incubator.apache.org Received: (qmail 3413 invoked by uid 500); 16 Apr 2008 11:06:29 -0000 Mailing-List: contact couchdb-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-dev@incubator.apache.org Delivered-To: mailing list couchdb-dev@incubator.apache.org Received: (qmail 3295 invoked by uid 99); 16 Apr 2008 11:06:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Apr 2008 04:06:29 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Apr 2008 11:05:45 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7DF1B234C0D3 for ; Wed, 16 Apr 2008 04:03:21 -0700 (PDT) Message-ID: <471114357.1208343801514.JavaMail.jira@brutus> Date: Wed, 16 Apr 2008 04:03:21 -0700 (PDT) From: "Kore Nordmann (JIRA)" To: couchdb-dev@incubator.apache.org Subject: [jira] Updated: (COUCHDB-41) Differentiate between not existent database and not existant document in response on 404 In-Reply-To: <2095743585.1208343081780.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-41?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kore Nordmann updated COUCHDB-41: --------------------------------- Summary: Differentiate between not existent database and not existant document in response on 404 (was: Differentiate between not exitant database and not existant document in response on 404) Fixed title, thanks Jan. > Differentiate between not existent database and not existant document in response on 404 > ---------------------------------------------------------------------------------------- > > Key: COUCHDB-41 > URL: https://issues.apache.org/jira/browse/COUCHDB-41 > Project: CouchDB > Issue Type: Improvement > Components: HTTP Interface > Environment: CouchDB 0.7.2 > Reporter: Kore Nordmann > Priority: Minor > > Currently it is not possible to know from a request on a not existent document in the database, if the database does not exist, or if it is just the document which is missing. > It would be nice to have this information in the response JSON structure, so that the application using the CouchDB could handle such errors more gracefully. An extract from a CouchDB interaction showing the problem: > == Ensure database is absent > DELETE /test HTTP/1.0 > Host: localhost > HTTP/1.0 404 Object Not Found > Server: inets/develop > Date: Tue, 15 Apr 2008 20:54:20 GMT > Cache-Control: no-cache > Pragma: no-cache > Expires: Tue, 15 Apr 2008 20:54:20 GMT > Connection: close > Content-Type: text/plain;charset=utf-8 > {"error":"not_found","reason":"missing"} > == Try GET on absent database > GET /test/not_existant HTTP/1.0 > Host: localhost > HTTP/1.0 404 Object Not Found > Server: inets/develop > Date: Tue, 15 Apr 2008 20:54:20 GMT > Cache-Control: no-cache > Pragma: no-cache > Expires: Tue, 15 Apr 2008 20:54:20 GMT > Connection: close > Content-Type: text/plain;charset=utf-8 > {"error":"not_found","reason":"missing"} > == Create database, but not the document > PUT /test HTTP/1.0 > Host: localhost > HTTP/1.0 201 Created > Server: inets/develop > Date: Tue, 15 Apr 2008 20:54:20 GMT > Cache-Control: no-cache > Pragma: no-cache > Expires: Tue, 15 Apr 2008 20:54:20 GMT > Connection: close > Content-Type: text/plain;charset=utf-8 > {"ok":true} > == Try to fetch document again > GET /test/not_existant HTTP/1.0 > Host: localhost > HTTP/1.0 404 Object Not Found > Server: inets/develop > Date: Tue, 15 Apr 2008 20:54:20 GMT > Cache-Control: no-cache > Pragma: no-cache > Expires: Tue, 15 Apr 2008 20:54:20 GMT > Connection: close > Content-Type: text/plain;charset=utf-8 > {"error":"not_found","reason":"missing"} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.