diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-06-03 15:49:31 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-06-03 15:49:31 +0200 |
| commit | c8d7ad9a6bc55af465392d772ae15e981d0f80c7 (patch) | |
| tree | e9423fa8d28f85b8ad6a1a16e59afadb8db441e9 /addons/web/static/src/js/core | |
| parent | 8085f259c87f1e6b7f9cf89067f56b327b8936e3 (diff) | |
| parent | 995aa1685eece9ff1070a637d19d511fb1f80260 (diff) | |
[MERGE] forward port branch saas-12.2 up to 995aa1685ee
Diffstat (limited to 'addons/web/static/src/js/core')
| -rw-r--r-- | addons/web/static/src/js/core/ajax.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/addons/web/static/src/js/core/ajax.js b/addons/web/static/src/js/core/ajax.js index 8e7216c7b00..8529c4135f7 100644 --- a/addons/web/static/src/js/core/ajax.js +++ b/addons/web/static/src/js/core/ajax.js @@ -27,11 +27,17 @@ function _genericJsonRpc (fct_name, params, settings, fct) { core.bus.trigger('rpc:result', data, result); if (result.error !== undefined) { if (result.error.data.arguments[0] !== "bus.Bus not available in test mode") { + var func = console.error; if (result.error.data.exception_type === "user_error") { - console.log("Server application error", JSON.stringify(result.error)); - } else { - console.error("Server application error", JSON.stringify(result.error)); + func = console.log; } + func( + "Server application error\n", + "Error code:", result.error.code, "\n", + "Error message:", result.error.message, "\n", + "Error data message:\n", result.error.data.message, "\n", + "Error data debug:\n", result.error.data.debug + ); } return Promise.reject({type: "server", error: result.error}); } else { |
