$ 0 0 I created the below function recently to encapsulate error handling logic for multiple JS object methods in a single place.