Create a class that implements ErrorHandler.
It has one method needs implementing: handleError
References:
https://angular.io/api/core/ErrorHandler