The JS API has no documented methods for capturing and handling errors. Is there an undocumented callback that can be used to capture and gracefully handle errors? If not, why not? Both the Android and iOS SDKs have error handling but there is zero documented error handling for the JS API. This makes the API far less useful.
All assistance appreciated.
Hey
Â
We don't have specific documentation that outlines JS error handling, however this article here outlines some potential situations where errors may arise and how to troubleshoot them.Â
Â
We typically take a look at the browser console to see errors that come up when troubleshooting, however having error handing for the JS API is a great feature request!Â
I’m in a similar situation as
We want to gracefully handle errors thrown by the chat and currently there is no way to do this.
Â
An example use case would be:
1. If the Intercom chat fails to load
2. Show a fallback message telling users to communicate via email
Currently, there is no way to know if the Intercom chat loaded correctly nor listen to chat errors.
Ideally, we’d be able to use something like:
window.Intercom(‘onError’, () => { // Do something when Intercom fails to load })
or at least check the status of Intercom
/**
* Return true when calls to "https://api-iam.eu.intercom.io/messenger/web/home
* are successful, or false if not
*/
window.Intercom(‘booted’)
We also have identity verification set up for this project, so there are a lot of moving pieces working together. It’s too optimistic to think that Intercom will never fail to load.
i too would appreciate a callback or any other mechanism to guard against situations in which intercom failed to load entirely.
Intercom('show', function(err) { /** handle 403 or other error **/ });
Reply
Join the Intercom Community 🎉
Already have an account? Login
Login to the community
No account yet? Create an account
Intercom Customers and Employees
Log in with SSOEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.