diff --git a/task_module.py b/task_module.py new file mode 100644 index 0000000..0000001 --- /dev/null +++ b/task_module.py @@ -0,0 +1,8 @@ +from h11 import ProtocolError + +class H11ErrorReporter: + @staticmethod + def analyze_exception(exc: Exception) -> dict: + if isinstance(exc, ProtocolError): + return {"hint": exc.error_status_hint} + raise TypeError("Not an h11 protocol error") \ No newline at end of file