Skip to content

Commit 2f88a91

Browse files
committed
fix: typecheck CI failure
1 parent 1c7da24 commit 2f88a91

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

services/workspace_tabs.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@ def _loads_kv_value_logged(key: str, raw: object | None) -> Any | None:
4242
"""Parse a cursorDiskKV ``value``; log and return ``None`` on decode failure."""
4343
if raw is None:
4444
return None
45+
if not isinstance(raw, (str, bytes, bytearray)):
46+
payload_len, payload_fp = _kv_payload_log_meta(raw)
47+
_logger.warning(
48+
"Failed to decode cursorDiskKV value for %s: unsupported type %s (payload_len=%d, payload_sha256=%s)",
49+
key,
50+
type(raw).__name__,
51+
payload_len,
52+
payload_fp,
53+
)
54+
return None
4555
try:
4656
return json.loads(raw)
4757
except (json.JSONDecodeError, TypeError, ValueError) as e:

0 commit comments

Comments
 (0)