Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 10729 invoked from network); 17 May 2009 03:56:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 May 2009 03:56:09 -0000 Received: (qmail 12037 invoked by uid 500); 17 May 2009 03:56:08 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 11932 invoked by uid 500); 17 May 2009 03:56:08 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 11922 invoked by uid 99); 17 May 2009 03:56:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 May 2009 03:56:08 +0000 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; Sun, 17 May 2009 03:56:06 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id CE75A234C004 for ; Sat, 16 May 2009 20:55:45 -0700 (PDT) Message-ID: <1779769948.1242532545830.JavaMail.jira@brutus> Date: Sat, 16 May 2009 20:55:45 -0700 (PDT) From: "Paul Joseph Davis (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Resolved: (COUCHDB-41) Differentiate between not existent database and not existant document in response on 404 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 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 ] Paul Joseph Davis resolved COUCHDB-41. -------------------------------------- Resolution: Fixed Fix Version/s: 0.10 Assignee: Paul Joseph Davis (was: Jan Lehnardt) When requesting a database that doesn't exist, the body is now: {"error": "not_found", "reason": "no_db_file"} > 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 > Assignee: Paul Joseph Davis > Priority: Blocker > Fix For: 0.10 > > > 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.