executeHandler method

Future<void> executeHandler(
  1. RequestHandler handler,
  2. Request req,
  3. Response res
)

Executes a handler with proper error handling.

Implementation

Future<void> executeHandler(
  RequestHandler handler,
  Request req,
  Response res,
) async {
  final wrappedHandler = wrapWithExceptionHandler(handler);
  await wrappedHandler(req, res);
}