From f4d89b3a49f38ed862cb6e0fd3a3e35552b42b40 Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Tue, 11 Mar 2014 17:39:56 +0100 Subject: [PATCH] [WO-265] handle offline mode in rest dao --- src/js/dao/rest-dao.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/js/dao/rest-dao.js b/src/js/dao/rest-dao.js index 2d3cb5e..d70fa60 100644 --- a/src/js/dao/rest-dao.js +++ b/src/js/dao/rest-dao.js @@ -66,9 +66,10 @@ define(function(require) { }); }; - xhr.onerror = function(e) { + xhr.onerror = function() { callback({ - errMsg: 'Error: ' + e.error + code: 404, + errMsg: 'Error calling GET on ' + options.uri }); }; @@ -97,9 +98,9 @@ define(function(require) { }); }; - xhr.onerror = function(e) { + xhr.onerror = function() { callback({ - errMsg: 'Error: ' + e.error + errMsg: 'Error calling PUT on ' + uri }); }; @@ -127,9 +128,9 @@ define(function(require) { }); }; - xhr.onerror = function(e) { + xhr.onerror = function() { callback({ - errMsg: 'Error: ' + e.error + errMsg: 'Error calling DELETE on ' + uri }); };