From bcef01a9f3fcf7856db6b5fa56240a09a5338e69 Mon Sep 17 00:00:00 2001 From: Ariel Sommeria-Klein Date: Fri, 28 Feb 2014 10:41:32 +0100 Subject: [PATCH] fix error handling in back office service calls --- BackOffice/js/services.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/BackOffice/js/services.js b/BackOffice/js/services.js index 0d1680f2..67bea959 100644 --- a/BackOffice/js/services.js +++ b/BackOffice/js/services.js @@ -35,8 +35,8 @@ amfphp.services.AmfphpMonitorService = {}; * */ amfphp.services.AmfphpMonitorService.getData = function(onSuccess, onError, flush){ var callData = JSON.stringify({"serviceName":"AmfphpMonitorService", "methodName":"getData","parameters":[flush]}); - $.post(amfphp.entryPointUrl, callData, onSuccess) - .error(onError); + $.post(amfphp.entryPointUrl, callData, onSuccess, "json") + .fail(onError); } /** @@ -44,8 +44,8 @@ amfphp.services.AmfphpMonitorService.getData = function(onSuccess, onError, flus * */ amfphp.services.AmfphpMonitorService.flush = function(onSuccess, onError){ var callData = JSON.stringify({"serviceName":"AmfphpMonitorService", "methodName":"flush","parameters":[]}); - $.post(amfphp.entryPointUrl, callData, onSuccess) - .error(onError); + $.post(amfphp.entryPointUrl, callData, onSuccess, "json") + .fail(onError); } /** @@ -64,7 +64,7 @@ amfphp.services.AmfphpDiscoveryService = {}; * */ amfphp.services.AmfphpDiscoveryService.discover = function(onSuccess, onError){ var callData = JSON.stringify({"serviceName":"AmfphpDiscoveryService", "methodName":"discover","parameters":[]}); - $.post(amfphp.entryPointUrl, callData, onSuccess) - .error(onError); + $.post(amfphp.entryPointUrl, callData, onSuccess, "json") + .fail(onError); }