summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields
diff options
context:
space:
mode:
authorJulien Castiaux <juc@odoo.com>2019-05-24 13:37:20 +0000
committerNicolas Martinelli <nim@odoo.com>2019-05-27 06:41:56 +0000
commit042966ccae3270a1119c4c5dcb095753cd6b784f (patch)
tree730a585d7aa9b937b9e2806bbefe2e62e297d8db /addons/web/static/src/js/fields
parentc868da4de607d48d27d5cf9852871ed4698627f8 (diff)
[IMP] web: better logging of errors
When an error is raised server-side, the complete traceback is displayed in the JS console. This traceback can be very useful since it might contain information not recorded anywhere else by default. For example, access errors due to record rules or SQL constrains do not have their traceback displayed in the UI or recorded in the log [1], but it is logged in the JS console. However, the information is logged in the JS console as a stringified version of the `result.error` object. The final result is a long and non-formatted string which is unreadable. We replace by a new format more convenient for technical teams. The error is now formatted as: Error code Error message Error data message Error data debug This will hopefully give a better starting point for debugging purposes. [1] SQL constrains tracebacks are only recorded in the log in debug mode: https://github.com/odoo/odoo/blob/ec792da72b92b22349b6f325e53fd37d953c7db3/odoo/service/model.py#L122 closes odoo/odoo#33650 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/fields')
0 files changed, 0 insertions, 0 deletions