You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Shahar Evron (JIRA)" <ji...@apache.org> on 2008/04/17 22:43:21 UTC

[jira] Created: (COUCHDB-43) Calling a non existing view returns 500 and not 404

Calling a non existing view returns 500 and not 404
---------------------------------------------------

                 Key: COUCHDB-43
                 URL: https://issues.apache.org/jira/browse/COUCHDB-43
             Project: CouchDB
          Issue Type: Bug
          Components: HTTP Interface
         Environment: Linux i386, glibc 2.7
            Reporter: Shahar Evron


CouchDB built from trunk r. 649204

When trying to call a non-existing view document the server returns an HTTP 500 message. 
It is expected that a 404 message would be returned instead. 

Example:

GET /porcupine/_view/wikipage/hierarchy?startkey=%5B%22Home%22%5D&endkey=%5B%22Home%22%2C2%5D HTTP/1.1
Date: Thu, 17 Apr 08 23:41:36 +0300

HTTP/1.1 500 Internal Server Error
Transfer-Encoding: chunked
Server: MochiWeb/1.0 (Any of you quaids got a smint?)
Date: Thu, 17 Apr 2008 20:41:36 GMT
Content-Type: text/plain;charset=utf-8

9a
{"error":"error","reason":"{{nocatch,{not_found,missing}},\n [{couch_db,open_doc_int,3},\n  {couch_db,open_doc,3},\n  {couch_view,start_update_loop,4}]}"}
0


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-43) Calling a non existing view returns 500 and not 404

Posted by "Jacob Torrey (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-43?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596357#action_12596357 ] 

Jacob Torrey commented on COUCHDB-43:
-------------------------------------

Seems to give the correct response (r. 655815).

GET /porcupine/ HTTP/1.1

HTTP/1.1 404 Object Not Found
Transfer-Encoding: chunked
Server: MochiWeb/1.0 (Any of you quaids got a smint?)
Date: Tue, 13 May 2008 11:14:04 GMT
Content-Type: text/plain;charset=utf-8

28
{"error":"not_found","reason":"missing"}
0

(I have no database porcupine)

> Calling a non existing view returns 500 and not 404
> ---------------------------------------------------
>
>                 Key: COUCHDB-43
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-43
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>         Environment: Linux i386, glibc 2.7
>            Reporter: Shahar Evron
>
> CouchDB built from trunk r. 649204
> When trying to call a non-existing view document the server returns an HTTP 500 message. 
> It is expected that a 404 message would be returned instead. 
> Example:
> GET /porcupine/_view/wikipage/hierarchy?startkey=%5B%22Home%22%5D&endkey=%5B%22Home%22%2C2%5D HTTP/1.1
> Date: Thu, 17 Apr 08 23:41:36 +0300
> HTTP/1.1 500 Internal Server Error
> Transfer-Encoding: chunked
> Server: MochiWeb/1.0 (Any of you quaids got a smint?)
> Date: Thu, 17 Apr 2008 20:41:36 GMT
> Content-Type: text/plain;charset=utf-8
> 9a
> {"error":"error","reason":"{{nocatch,{not_found,missing}},\n [{couch_db,open_doc_int,3},\n  {couch_db,open_doc,3},\n  {couch_view,start_update_loop,4}]}"}
> 0

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-43) Calling a non existing view returns 500 and not 404

Posted by "Christopher Lenz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-43?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christopher Lenz updated COUCHDB-43:
------------------------------------

    Fix Version/s: 0.8

> Calling a non existing view returns 500 and not 404
> ---------------------------------------------------
>
>                 Key: COUCHDB-43
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-43
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>         Environment: Linux i386, glibc 2.7
>            Reporter: Shahar Evron
>             Fix For: 0.8
>
>
> CouchDB built from trunk r. 649204
> When trying to call a non-existing view document the server returns an HTTP 500 message. 
> It is expected that a 404 message would be returned instead. 
> Example:
> GET /porcupine/_view/wikipage/hierarchy?startkey=%5B%22Home%22%5D&endkey=%5B%22Home%22%2C2%5D HTTP/1.1
> Date: Thu, 17 Apr 08 23:41:36 +0300
> HTTP/1.1 500 Internal Server Error
> Transfer-Encoding: chunked
> Server: MochiWeb/1.0 (Any of you quaids got a smint?)
> Date: Thu, 17 Apr 2008 20:41:36 GMT
> Content-Type: text/plain;charset=utf-8
> 9a
> {"error":"error","reason":"{{nocatch,{not_found,missing}},\n [{couch_db,open_doc_int,3},\n  {couch_db,open_doc,3},\n  {couch_view,start_update_loop,4}]}"}
> 0

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (COUCHDB-43) Calling a non existing view returns 500 and not 404

Posted by "Christopher Lenz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-43?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christopher Lenz resolved COUCHDB-43.
-------------------------------------

    Resolution: Fixed

Right, this seems to work okay in trunk, although I'm not sure when it was fixed :/

> Calling a non existing view returns 500 and not 404
> ---------------------------------------------------
>
>                 Key: COUCHDB-43
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-43
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>         Environment: Linux i386, glibc 2.7
>            Reporter: Shahar Evron
>
> CouchDB built from trunk r. 649204
> When trying to call a non-existing view document the server returns an HTTP 500 message. 
> It is expected that a 404 message would be returned instead. 
> Example:
> GET /porcupine/_view/wikipage/hierarchy?startkey=%5B%22Home%22%5D&endkey=%5B%22Home%22%2C2%5D HTTP/1.1
> Date: Thu, 17 Apr 08 23:41:36 +0300
> HTTP/1.1 500 Internal Server Error
> Transfer-Encoding: chunked
> Server: MochiWeb/1.0 (Any of you quaids got a smint?)
> Date: Thu, 17 Apr 2008 20:41:36 GMT
> Content-Type: text/plain;charset=utf-8
> 9a
> {"error":"error","reason":"{{nocatch,{not_found,missing}},\n [{couch_db,open_doc_int,3},\n  {couch_db,open_doc,3},\n  {couch_view,start_update_loop,4}]}"}
> 0

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.