Raised when there is a protocol-level error.
| 168 | |
| 169 | |
| 170 | class DirtyProtocolError(DirtyError): |
| 171 | """Raised when there is a protocol-level error.""" |
| 172 | |
| 173 | def __init__(self, message="Protocol error", raw_data=None): |
| 174 | details = {} |
| 175 | if raw_data is not None: |
| 176 | # Truncate raw data for safety |
| 177 | if isinstance(raw_data, bytes): |
| 178 | raw_data = raw_data[:100].hex() |
| 179 | details["raw_data"] = str(raw_data)[:200] |
| 180 | super().__init__(message, details) |
no outgoing calls
no test coverage detected