File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8+ ## [ 5.0.0-patch-1] - 2026-03-16
9+
10+ - Gracefully handle unknown message types
11+
812## [ 5.0.0] - 2025-08-14
913
1014- Moved channel field to root of AddTranscript message for multichannel transcription.
Original file line number Diff line number Diff line change 1- 5.0.0
1+ 5.0.0-patch-1
Original file line number Diff line number Diff line change @@ -255,12 +255,15 @@ def _consumer(self, message):
255255 message = json .loads (message )
256256 message_type = message ["message" ]
257257
258- for handler in self .event_handlers [message_type ]:
259- try :
260- handler (copy .deepcopy (message ))
261- except ForceEndSession :
262- LOGGER .warning ("Session was ended forcefully by an event handler" )
263- raise
258+ try :
259+ for handler in self .event_handlers [message_type ]:
260+ try :
261+ handler (copy .deepcopy (message ))
262+ except ForceEndSession :
263+ LOGGER .warning ("Session was ended forcefully by an event handler" )
264+ raise
265+ except KeyError as kex :
266+ LOGGER .debug (f"Unknown handler for message type: { message_type } { kex = } " )
264267
265268 if message_type == ServerMessageType .RecognitionStarted :
266269 self ._flag_recognition_started ()
You can’t perform that action at this time.
0 commit comments