docs: function hapiRegisterFunction(server, options, next) {
      if (isObject(server)) {
        if (isFunction(server.on)) {
          server.on('request-error', function(req, err) {
            var em = hapiErrorHandler(req, err, config);
  
            client.sendError(em);
          });
        }
  
        if (isFunction(server.ext)) {
          server.ext('onPreResponse', function(request, reply) {
            var em = null;
  
            if (isObject(request) && isObject(request.response) &&
                request.response.isBoom) {
              em = hapiErrorHandler(request, new Error(request.response.message),
                                    config);
  
              client.sendError(em);
            }
  
            if (isObject(reply) && isFunction(reply.continue)) {
              reply.continue();
            }
          });
        }
      }
  
      if (isFunction(next)) {
        return next();
      }
    }