You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consumer code that iterates a subscribe queue sees except KalshiBackpressureError as e with only str(e) — no way to discriminate which channel/sid/client_id overflowed when multiple subscriptions exist. The error must be parsed from the message string, which is brittle and breaks the structured-error contract #226 established for KalshiSequenceGapError and KalshiSubscriptionError.
Location
kalshi/errors.py:121-122 — bare class, no fields
kalshi/ws/channels.py:537-551 — broadcast site
kalshi/ws/backpressure.py:78-86 — raise site
Evidence
classKalshiBackpressureError(KalshiWebSocketError):
"""Message queue overflow with ERROR strategy."""# no __init__, no fields
Compare KalshiSequenceGapError which carries channel, sid, client_id, last_seq, next_seq.
Recommended fix
Add __init__ with channel, sid, client_id, maxsize keyword-only fields; populate them at the put() raise site in backpressure.py:78-86 and at the broadcast_error site so the iterator's except block can route by channel.
Activity