[FIX] im_livechat: odoo error popup on external pages

Before this commit, an Odoo dialog would open to show errors that
occurred in the pages embedding the live chat. We should not display
errors originating from outside the embedded script. Moreover, the
error service listens to the error event on the window object. Thus,
errors occurring in the shadow DOM won't be caught. As a result, the
error service disrupts the site that embeds it and is entirely useless
for the live chat.

This PR removes the error service from the embedded live chat.

OPW-3699040

closes odoo/odoo#154102

X-original-commit: 24b6b7a43748b5f1053aa7c70dc7046dbc894c7f
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
This commit is contained in:
tsm-odoo
2024-02-19 12:27:46 +00:00
parent f2545214aa
commit c71aad6ef3
@@ -42,4 +42,8 @@ import { session } from "@web/session";
},
{ force: true }
);
// Remove the error service: it fails to identify issues within the shadow
// DOM of the live chat and causes disruption for pages that embed it by
// displaying pop-ups for errors outside of its scope.
registry.category("services").remove("error");
})();