A good starter practice is to instrument your application using try…catch statements. This allows you to gracefully handle the error and show a message to the user:
Now, while this pattern will help you create a better user experience, it still doesn’t inform you about these kinds of events. A minor change can be made to greatly improve this abstraction:
That’s it! Sentry takes care of the problem and gets out of your way.