Return-Path: Delivered-To: apmail-incubator-couchdb-dev-archive@locus.apache.org Received: (qmail 26886 invoked from network); 16 Apr 2008 10:54:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Apr 2008 10:54:27 -0000 Received: (qmail 81606 invoked by uid 500); 16 Apr 2008 10:54:27 -0000 Delivered-To: apmail-incubator-couchdb-dev-archive@incubator.apache.org Received: (qmail 81577 invoked by uid 500); 16 Apr 2008 10:54:27 -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 81568 invoked by uid 99); 16 Apr 2008 10:54:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Apr 2008 03:54:27 -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 10:53:52 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C2501234C0CA for ; Wed, 16 Apr 2008 03:51:21 -0700 (PDT) Message-ID: <2095743585.1208343081780.JavaMail.jira@brutus> Date: Wed, 16 Apr 2008 03:51:21 -0700 (PDT) From: "Kore Nordmann (JIRA)" To: couchdb-dev@incubator.apache.org Subject: [jira] Created: (COUCHDB-41) Differentiate between not exitant 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-Virus-Checked: Checked by ClamAV on apache.org Differentiate between not exitant 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.