You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by de...@apache.org on 2014/02/20 21:10:46 UTC

couchdb commit: updated refs/heads/paginate-api-options to a9bef61

Repository: couchdb
Updated Branches:
  refs/heads/paginate-api-options 75c707712 -> a9bef616d


Invalid combination of query options causes the dashboard to hang


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/a9bef616
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/a9bef616
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/a9bef616

Branch: refs/heads/paginate-api-options
Commit: a9bef616d262598ea01d9e9a0c4c956786203e14
Parents: 75c7077
Author: suelockwood <de...@apache.org>
Authored: Thu Feb 20 15:10:43 2014 -0500
Committer: suelockwood <de...@apache.org>
Committed: Thu Feb 20 15:10:43 2014 -0500

----------------------------------------------------------------------
 src/fauxton/app/addons/documents/views.js | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/a9bef616/src/fauxton/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/documents/views.js b/src/fauxton/app/addons/documents/views.js
index 78a2c09..5468948 100644
--- a/src/fauxton/app/addons/documents/views.js
+++ b/src/fauxton/app/addons/documents/views.js
@@ -439,6 +439,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
     serialize: function () {
        var totalRows = 0,
           updateSeq = false,
+          recordStart = 0,
           pageStart = 0,
           pageEnd = 20;
 
@@ -586,10 +587,21 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
     establish: function() {
       if (this.newView) { return null; }
 
-      return this.collection.fetch({reset: true}).fail(function() {
-        // TODO: handle error requests that slip through
-        // This should just throw a notification, not break the page
-        console.log("ERROR: ", arguments);
+      return this.collection.fetch({
+        reset: true,
+        success:  function() { },
+        error: function(model, xhr, options){
+          // TODO: handle error requests that slip through
+          // This should just throw a notification, not break the page
+          FauxtonAPI.addNotification({
+            msg: "Bad Request",
+            type: "error"
+          });
+
+          //now redirect back to alldocs
+          FauxtonAPI.navigate(model.database.url("index") + "?limit=100");
+          console.log("ERROR: ", arguments);
+        }
       });
     },