Exception: Assistant::ConversationDestroyed
- Inherits:
-
StandardError
- Object
- StandardError
- Assistant::ConversationDestroyed
- Defined in:
- app/services/assistant/conversation_destroyed.rb
Overview
Raised when the conversation row is destroyed out from under an in-flight
AssistantChatWorker turn — the owner deletes the chat (or Daily Focus
cleanup destroys the briefing conversation) while the worker is still
streaming. The next RubyLLM persistence insert (add_message for the
user/tool message, persist_new_message for the blank assistant
placeholder) would otherwise crash on PG::ForeignKeyViolation
(assistant_messages → assistant_conversations, AppSignal #6043).
AssistantConversation guards both insert paths and raises this instead;
AssistantChatWorker rescues it and exits quietly — there is nothing to
persist to and nobody to broadcast to.
Instance Method Summary collapse
Constructor Details
#initialize(message = 'Conversation was destroyed while processing.') ⇒ void
19 20 21 |
# File 'app/services/assistant/conversation_destroyed.rb', line 19 def initialize( = 'Conversation was destroyed while processing.') super end |