File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -726,7 +726,11 @@ def handle_notification(method: str, params: dict):
726726 session_id = params ["sessionId" ]
727727 event_dict = params ["event" ]
728728 # Convert dict to SessionEvent object
729- event = session_event_from_dict (event_dict )
729+ try :
730+ event = session_event_from_dict (event_dict )
731+ except Exception :
732+ # Silently ignore unknown/malformed event types for forward compatibility
733+ return
730734 with self ._sessions_lock :
731735 session = self ._sessions .get (session_id )
732736 if session :
@@ -801,7 +805,11 @@ def handle_notification(method: str, params: dict):
801805 session_id = params ["sessionId" ]
802806 event_dict = params ["event" ]
803807 # Convert dict to SessionEvent object
804- event = session_event_from_dict (event_dict )
808+ try :
809+ event = session_event_from_dict (event_dict )
810+ except Exception :
811+ # Silently ignore unknown/malformed event types for forward compatibility
812+ return
805813 session = self ._sessions .get (session_id )
806814 if session :
807815 session ._dispatch_event (event )
You can’t perform that action at this time.
0 commit comments