How to handle unhandled rejections?

My app usually crashes when a very weird unhandled rejection occurs, usually when it's an event where I don't have a general error handler.
So how can I catch unhandled rejections effectively? (Maybe even do something with it like send it with a Webhook or log it)
Was this page helpful?