Error Handling
Operational failures (success=false, timeouts) return a CommandResult
or SendMessageResult - inspect the return value. Exceptions cover
connection loss, invalid state, and authentication or session errors. Most call
commands do not raise when answer() or connect() fails; they return a falsy
CommandResult (if not result: works). WhatsApp send failures stay on
SendMessageResult; check result.success (do not use if result:).
Unsupported message types raise MessageError.
Exception hierarchy (selected)
Catch AgentDuetError for any SDK error, or a subclass for finer control.
Unanswered connect() / dial()
The call can stay active after CALL_UNANSWERED - retry, try another number, or end it.
WhatsApp send failures
See WhatsApp Messaging.
