[FIX] web: client-side RPC error to have an arguments data member
Several XHR error handlers expect a data.arguments member which holds the args tuple from the Python exception. Some have alternate codepaths for "xhr errors" but several don't (e.g. addons/payment/static/src/js/payment_form.js:142, addons/web/static/src/js/services/crash_manager.js:229, addons/website/static/src/js/content/website_root.js:167) and will thus blow up on synthetic client-side xhr errors. Modify the synthetic errors so they provide that member as an array.
This commit is contained in:
@@ -87,7 +87,8 @@ function _genericJsonRpc (fct_name, params, settings, fct) {
|
||||
data: {
|
||||
type: "xhr"+textStatus,
|
||||
debug: error.responseText,
|
||||
objects: [error, errorThrown]
|
||||
objects: [error, errorThrown],
|
||||
arguments: [reason || textStatus]
|
||||
},
|
||||
};
|
||||
reject({message: nerror, event: $.Event()});
|
||||
|
||||
Reference in New Issue
Block a user