Invoked web an error occurs
FutureOr<void> Function(WebSocketSession session, dynamic error)? onError;