A handler for an incoming JSON-RPC request.
Returns the response result, or throws to produce an error response.
typedef RequestHandler = FutureOr<Object?> Function(Object? params);