Add source parameter to ErrorFrame and set it in FrameProcessor. Updated error handling in AnthropicLLMService and DeepgramSTTService to include ErrorFrame with source information.

This commit is contained in:
richtermb
2025-08-01 11:14:50 -07:00
parent b8eef4f93b
commit ead4e97ab5
4 changed files with 8 additions and 0 deletions

View File

@@ -652,10 +652,12 @@ class ErrorFrame(SystemFrame):
Parameters:
error: Description of the error that occurred.
fatal: Whether the error is fatal and requires bot shutdown.
source: The frame processor that generated the error.
"""
error: str
fatal: bool = False
source: Optional[FrameProcessor] = None
def __str__(self):
return f"{self.name}(error: {self.error}, fatal: {self.fatal})"