Previously we removed some code related to handling errors in legacy RPC, that would wrap errors in an object and give them an event that could be defaultPrevented to mark the error as handled, but this code is still needed. This commit restores it. closes odoo/odoo#134693 Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>