You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by be...@apache.org on 2015/09/25 21:25:46 UTC

fauxton commit: updated refs/heads/master to a589e59

Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master 7e1bbc335 -> a589e5944


Catch all errors when failing to load doc

This makes the error handling for loading a doc a little more
generic. This actually caused an issue on the dash, not with
Fauxton - but good to change so that all errors are caught when
failing to load a document and the user's redirected back
to the database all docs page.


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

Branch: refs/heads/master
Commit: a589e59445d6c68d2f894386e0df78d5b9655186
Parents: 7e1bbc3
Author: Ben Keen <be...@gmail.com>
Authored: Thu Sep 24 16:07:24 2015 -0700
Committer: Ben Keen <be...@gmail.com>
Committed: Thu Sep 24 16:07:24 2015 -0700

----------------------------------------------------------------------
 app/addons/documents/doc-editor/actions.js | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/a589e594/app/addons/documents/doc-editor/actions.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/doc-editor/actions.js b/app/addons/documents/doc-editor/actions.js
index 3d41d0d..a7f076b 100644
--- a/app/addons/documents/doc-editor/actions.js
+++ b/app/addons/documents/doc-editor/actions.js
@@ -39,10 +39,8 @@ function (app, FauxtonAPI, ActionTypes) {
         params.onLoaded();
       }
     }, function (xhr, reason, msg) {
-      if (xhr.status === 404) {
-        errorNotification('The document does not exist.');
-        FauxtonAPI.navigate(FauxtonAPI.urls('allDocs', 'app', params.database.id, ''));
-      }
+      errorNotification('The document does not exist.');
+      FauxtonAPI.navigate(FauxtonAPI.urls('allDocs', 'app', params.database.id, ''));
     });
   }