mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-12 20:44:50 +00:00
fix the error callbacks in the client
This commit is contained in:
parent
f6b90c0097
commit
7bdc595dd0
@ -101,13 +101,13 @@ Ext.namespace('Ext.ux.util');
|
|||||||
errorObj = {
|
errorObj = {
|
||||||
id: options.id,
|
id: options.id,
|
||||||
result: null,
|
result: null,
|
||||||
error: 'HTTP' + response.status
|
error: 'HTTP: ' + response.status + ' ' + response.statusText
|
||||||
}
|
}
|
||||||
if (Ext.type(options.failure) != 'function') return;
|
if (Ext.type(options.failure) != 'function') return;
|
||||||
if (options.scope) {
|
if (options.scope) {
|
||||||
options.failure.call(options.scope, responseObj.error, responseObj, response);
|
options.failure.call(options.scope, errorObj, response, requestOptions);
|
||||||
} else {
|
} 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 (responseObj.error) {
|
||||||
if (Ext.type(options.failure) != 'function') return;
|
if (Ext.type(options.failure) != 'function') return;
|
||||||
if (options.scope) {
|
if (options.scope) {
|
||||||
options.failure.call(options.scope, responseObj.error, responseObj, response, requestOptions);
|
options.failure.call(options.scope, responseObj, response, requestOptions);
|
||||||
} else {
|
} else {
|
||||||
options.failure(responseObj.error, responseObj, response, requestOptions);
|
options.failure(responseObj, response, requestOptions);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (Ext.type(options.success) != 'function') return;
|
if (Ext.type(options.success) != 'function') return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user