Method
format_websocket_error
(self, websocket: WebSocketData)
Source from the content-addressed store, hash-verified
| 330 | ) |
| 331 | |
| 332 | def format_websocket_error(self, websocket: WebSocketData) -> str: |
| 333 | try: |
| 334 | ret = CloseReason(websocket.close_code).name # type: ignore |
| 335 | except ValueError: |
| 336 | ret = f"UNKNOWN_ERROR={websocket.close_code}" |
| 337 | if websocket.close_reason: |
| 338 | ret += f" (reason: {websocket.close_reason})" |
| 339 | return ret |
| 340 | |
| 341 | def _proto_error(self, f): |
| 342 | if self.match(f): |
Tested by
no test coverage detected