code: function(e, req, res, response, next) {
  
    if (this.useErrorHandler === true) {
      next(e);
    } else {
      if (response) {
        res.set(response.headers);
      }
  
      res.status(e.code);
  
      if (e instanceof UnauthorizedRequestError) {
        return res.send();
      }
  
      res.send({ error: e.name, error_description: e.message });
    }
  }
docs: Handle error.