Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4E94BC0AF for ; Sat, 26 Jan 2013 20:33:13 +0000 (UTC) Received: (qmail 94175 invoked by uid 500); 26 Jan 2013 20:33:12 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 94141 invoked by uid 500); 26 Jan 2013 20:33:12 -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 94132 invoked by uid 99); 26 Jan 2013 20:33:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Jan 2013 20:33:12 +0000 Date: Sat, 26 Jan 2013 20:33:12 +0000 (UTC) From: "Joan Touzet (JIRA)" To: dev@couchdb.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (COUCHDB-1053) missing_named_view for reduce fxns that compile but throw runtime errors MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COUCHDB-1053?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13563623#comment-13563623 ] Joan Touzet commented on COUCHDB-1053: -------------------------------------- In 1.3.x and master, we no longer throw missing_named_view. If you have a run-time error in a reduce or map function, the error is logged to the logfile as, for example: [info] [<0.638.0>] OS Process #Port<0.3197> Log :: function raised exception (new TypeError("This is a fake TypeError.", "undefined", 1)) , but we still return a 200 with any results that manage to successfully return. If no results are returned, it looks like: {"rows":[ {"key":null,"value":null} ]} for a reduce=true and {"rows":[ ]} for a reduce=false. Recommend closing as the error reported by the original poster is no longer accurate. This is about the best we can do, though in the future we could consider a 5xx upon any thrown errors. > missing_named_view for reduce fxns that compile but throw runtime errors > ------------------------------------------------------------------------ > > Key: COUCHDB-1053 > URL: https://issues.apache.org/jira/browse/COUCHDB-1053 > Project: CouchDB > Issue Type: Bug > Components: JavaScript View Server > Environment: OSX, prebuilt > Reporter: Ryan Richt > Assignee: Joan Touzet > Priority: Trivial > Fix For: 1.3 > > Original Estimate: 1h > Remaining Estimate: 1h > > Attempting to query a map-only view with reduce=false yields the same error message as (1) a view that is undefined and (2) a view that has a defined, compile-time valid, but run-time invalid reduce function. So if your reduce function throws a TypeError, you get this cryptic error (cryptic b/c so many problems yield the same error) instead of an error to that effect. Errors do show up in the log, and this is what the view gives: > {"error":"not_found","reason":"missing_named_view"} > Might be fixed in 1.0.2 but I cant use the built-in updater anymore after corporate firewall changes! -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira