code: function(req, res) {
          if (res.locals.success) {
              options.success(model, response);
          } else {
              options.error(model, response);
          }
      }
docs: Create a route handler wrapper to call success or error.