ServerErrorHook typedef

ServerErrorHook = FutureOr<Response?> Function(Object error, StackTrace stackTrace, ServerLifecycleContext context)

Converts uncaught request errors into an optional response.

Implementation

typedef ServerErrorHook =
    FutureOr<Response?> Function(
      Object error,
      StackTrace stackTrace,
      ServerLifecycleContext context,
    );