From 7bdc595dd0755b3e61bdd5b14d0b50a919b40322 Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Mon, 22 Jun 2009 07:56:45 +0000 Subject: [PATCH] fix the error callbacks in the client --- deluge/ui/web/js/Deluge.Client.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/deluge/ui/web/js/Deluge.Client.js b/deluge/ui/web/js/Deluge.Client.js index e17b8ff7a..52fbd81b6 100644 --- a/deluge/ui/web/js/Deluge.Client.js +++ b/deluge/ui/web/js/Deluge.Client.js @@ -101,13 +101,13 @@ Ext.namespace('Ext.ux.util'); errorObj = { id: options.id, result: null, - error: 'HTTP' + response.status + error: 'HTTP: ' + response.status + ' ' + response.statusText } if (Ext.type(options.failure) != 'function') return; if (options.scope) { - options.failure.call(options.scope, responseObj.error, responseObj, response); + options.failure.call(options.scope, errorObj, response, requestOptions); } else { - options.failure(responseObj.error, responseObj, response); + options.failure(errorObj, response, requestOptions); } }, @@ -117,9 +117,9 @@ Ext.namespace('Ext.ux.util'); if (responseObj.error) { if (Ext.type(options.failure) != 'function') return; if (options.scope) { - options.failure.call(options.scope, responseObj.error, responseObj, response, requestOptions); + options.failure.call(options.scope, responseObj, response, requestOptions); } else { - options.failure(responseObj.error, responseObj, response, requestOptions); + options.failure(responseObj, response, requestOptions); } } else { if (Ext.type(options.success) != 'function') return;