Author: damoxc

Revision: 5398

Log:
        fix the error callbacks in the client

Diff:
Modified: trunk/deluge/ui/web/js/Deluge.Client.js
===================================================================
--- trunk/deluge/ui/web/js/Deluge.Client.js     2009-06-18 08:25:14 UTC (rev 
5397)
+++ trunk/deluge/ui/web/js/Deluge.Client.js     2009-06-22 07:56:45 UTC (rev 
5398)
@@ -101,13 +101,13 @@
             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 @@
             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;



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to