Overview
When the server detects non-critical issues during connection, it sends a separateconversation.connected.warning event immediately after the conversation.connected.success event to inform the client without terminating the connection.
Event Structure
Event Properties
string
Event type. Always
"conversation.connected.warning" for this event.string
Warning message describing the non-critical issue that occurred.Example:
"Warning: Found 2 avatars with the same name 'MyAvatar'. Using the most recently updated one (avatarId: abc-123)"When This Event is Sent
This event is sent immediately afterconversation.connected.success when non-critical issues are detected during the connection process.
Common Scenarios
Duplicate Avatar Names
When connecting using thename parameter and multiple avatars share the same name, the server will:
- Automatically select the most recently updated avatar (based on
updated_attimestamp) - Send
conversation.connected.successevent first - Send
conversation.connected.warningevent with details about the duplicate names and which avatar was selected - Continue with the connection normally
Usage Example
Message Sequence
When a warning occurs, you will receive events in this order:conversation.connected.success- Connection established successfullyconversation.connected.warning- Warning about non-critical issue- Other events continue normally (e.g.,
realtime.session.created)
Best Practices
- Always handle warning messages in your application
- Display warnings to users so they are aware of potential issues
- Consider using
avatarIdinstead ofnameto avoid duplicate name scenarios - Log warning messages for debugging purposes
Related Events
conversation.connected.success- Sent before this warning event