def on_run_status_changed()

in 3-ai-native-e2e-sample/backend/agents/literature.py [0:0]


    def on_run_status_changed(self, event_data):
        """Handle run status changed events"""
        status = event_data.get("status")
        self.current_run_status = status
        logger.info(f"Thread run status: {status}")
        
        if status == RunStatus.FAILED:
            return json.dumps({
                "type": "error",
                "content": "The assistant encountered an error processing your request."
            })
        return None