diff options
| author | XavierDo <xdo@odoo.com> | 2018-09-14 11:04:07 +0200 |
|---|---|---|
| committer | XavierDo <xdo@odoo.com> | 2018-09-14 13:56:32 +0200 |
| commit | 71663b7f57676a5c06babb2917ec6e8bf0496679 (patch) | |
| tree | b903a420c7af11400e1c917be25401e21e4bd420 /addons/web/static/src | |
| parent | b0cc678f179932c6549cf9b5c7568bf528612b01 (diff) | |
[IMP] web: log user_error as info instead of error
Since a console.error will mark a tests as failed, logging user error
as info will allow to test a flow with user error without
marking the runbot red
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/core/ajax.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/web/static/src/js/core/ajax.js b/addons/web/static/src/js/core/ajax.js index d1bdd8d9d8d..45313b99428 100644 --- a/addons/web/static/src/js/core/ajax.js +++ b/addons/web/static/src/js/core/ajax.js @@ -29,7 +29,11 @@ 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") { - console.error("Server application error", JSON.stringify(result.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)); + } } return $.Deferred().reject("server", result.error); } else { |
