diff --git a/CHANGELOG.md b/CHANGELOG.md index d8bf560cef4ab00bd2a190a32c610941b624ca5e..9cbef29def1b85ad04a0bc347c4abaf876e2538d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- added error handling if no matching channel type is found - ... ### Changed diff --git a/src/aura_engine/core/channels.py b/src/aura_engine/core/channels.py index b32e521693185c00d8dd306eb0e14c5a063d3ff4..3bb362a7f0c4dc74bcc7835de6194248f0330d9a 100644 --- a/src/aura_engine/core/channels.py +++ b/src/aura_engine/core/channels.py @@ -601,6 +601,8 @@ class ChannelFactory: Returns: (GenericChannel): A concrete implementation of the generic channel + Raises: + ValueError: If no matching channel type is found """ if channel_name in ChannelType.QUEUE.channels: self.logger.debug(f"Create new QUEUE channel '{channel_name}'") @@ -611,8 +613,11 @@ class ChannelFactory: if channel_name in ChannelType.LIVE.channels: self.logger.debug(f"Create new LINE channel '{channel_name}'") return LineChannel(channel_index, channel_name, mixer) - # FIXME: Error handling when no ChannelType was found - self.logger.error("No ChannelType found! Now stuff is not working as intended") + error_message = ( + f"No valid ChannelType found for channel '{channel_name}'. Not working as intended." + ) + self.logger.error(error_message) + raise ValueError(error_message) class PlayoutStatusResponse(StrEnum):