How are error states handled in agent server? E.g...
# proj-sdk
q
How are error states handled in agent server? E.g if ran out of llm credits how is this error state plumbed back to the client? Does it get sent in the
ConversationStateUpdateEvent
object and are the errors known types?
m
If I understand correctly, in local_conversation.py of the software-agent-sdk, the following logic is used to send the error back to the client thankyou
Copy code
# Add an error event
self._on_event(
    ConversationErrorEvent(
        source="environment",
        code=e.__class__.__name__,
        detail=str(e),
    )
)
The front-end also handles that event in conversation-websocket-context.tsx.
Copy code
// Handle ConversationErrorEvent specifically
if (isConversationErrorEvent(event)) {
  setErrorMessage(event.detail);
}