index.js
function decorate (fn) {
  return async function (...args) {
    try {
      return fn.call(this, ...args);
    } catch (err) {
      this.logger && this.logger.error(err.message);
      throw err;
    }
  };
}
function decorate (fn) {
  return async function (...args) {
    try {
      return fn.call(this, ...args);
    } catch (err) {
      this.logger && this.logger.error(err.message);
      throw err;
    }
  };
}
function decorate ( fn ) { return async function ( ... args ) { try { return fn . call ( this , ... args ) ; } catch ( err ) { this . logger && this . logger . error ( err . message ) ; throw err ; } } ; }
decorator-like function that wraps the methods
decorator - like function that wraps the methods