diff options
author | suelockwood <deathbear@apache.org> | 2014-02-20 15:10:43 -0500 |
---|---|---|
committer | Garren Smith <garren.smith@gmail.com> | 2014-03-03 11:18:42 +0200 |
commit | 747e0040b1c491db47b932c807aef1982f61f394 (patch) | |
tree | 1728af8062ffe2b4e6ab953d2df249557f8844cf | |
parent | 77c06c28878015613c30f8c042aeaabdbb3423c8 (diff) | |
download | couchdb-747e0040b1c491db47b932c807aef1982f61f394.tar.gz |
Invalid combination of query options causes the dashboard to hang
-rw-r--r-- | src/fauxton/app/addons/documents/views.js | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/fauxton/app/addons/documents/views.js b/src/fauxton/app/addons/documents/views.js index 78a2c0970..546894885 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); + } }); }, |