Overview
When an initialization error occurs, users see a generic error message with a specific error code that can be copied and shared with support. Users see the same message for all errors—only the error code differs. This keeps the user experience simple while allowing developers and support teams to identify the specific issue. Error Code Format:SDK_ERR_XXXX, where the number indicates the category.
Quick Reference
| Code Range | Category |
|---|---|
| 1000 | General/Unknown |
| 1001-1006 | Authentication |
| 1011-1014 | Agent Configuration |
| 1021-1024 | Data Loading |
| 1031-1033 | Network/Connection |
| 1041-1042 | Permissions |
Authentication Errors (1001-1006)
SDK_ERR_1001 - Authentication Failed
Cause: Token validation failed. Solution: Verify yourfetchAuthentication returns a valid token object.
SDK_ERR_1002 - Token Expired
Cause: Token has expired. Solution: Implement token refresh:SDK_ERR_1003 - Token Invalid
Cause: Token is malformed. Solution: Check you’re returning the correct token format from your auth service.SDK_ERR_1004 - Token Missing
Cause: No token provided. Solution: EnsurefetchAuthentication returns { token: string }:
SDK_ERR_1005 - Anonymous Access Denied
Cause: Agent requires authentication. Solution: Either providefetchAuthentication or enable anonymous access in Agent Management Studio.
SDK_ERR_1006 - URL Not Whitelisted
Cause: Current domain not in anonymous access safelist. Solution: Add your domain in Agent Management Studio or use authenticated access.Agent Configuration Errors (1011-1014)
SDK_ERR_1011 - Agent Configuration Missing
Cause: Agent not configured. Solution: Verify the agent exists and is published in Agent Management Studio.SDK_ERR_1012 - Agent Not Found
Cause: No agent with specifiedagentUid.
Solution: Check for typos—the UID is case-sensitive:
SDK_ERR_1013 - Agent Configuration Invalid
Cause: Agent configuration is corrupted. Solution: Review settings in Agent Management Studio or recreate the agent.SDK_ERR_1014 - Agent Inactive
Cause: Agent is disabled or unpublished. Solution: Activate the agent in Agent Management Studio.Data Loading Errors (1021-1024)
SDK_ERR_1021 - Application Model Load Failed
Cause: InvalidappUid or application deleted.
Solution: Verify the ID in your init call:
SDK_ERR_1022 - User Model Load Failed
Cause: User profile couldn’t be loaded. Solution: Verify the auth token corresponds to a valid user.SDK_ERR_1023 - Agent Model Load Failed
Cause: Agent data couldn’t be loaded. Solution: Check agent setup is complete in Agent Management Studio.SDK_ERR_1024 - Required Models Not Loaded
Cause: Multiple data loads failed. Solution: Check network connection and refresh the page.Network Errors (1031-1033)
SDK_ERR_1031 - Network Timeout
Cause: Request took too long. Solution: Check internet connection and try again.SDK_ERR_1032 - Network Connection Failed
Cause: No connection to Mindset AI services. Solution: Verify internet connectivity and firewall settings.SDK_ERR_1033 - Firestore Connection Failed
Cause: Database connection failed. Solution: Check the following:- Internet connectivity
- Firebase status at status.firebase.google.com
- Firewall allows
*.firebaseio.comand*.googleapis.com
Permission Errors (1041-1042)
SDK_ERR_1041 - Firestore Permission Denied
Cause: User lacks permission to access data. Solution: Check user roles and permissions in Agent Management Studio.SDK_ERR_1042 - Application Access Denied
Cause: User not authorized for this application. Solution: Verify user access settings in Agent Management Studio.General Error
SDK_ERR_1000 - Unknown Error
Cause: Unexpected error. Solution: Check browser console for details and contact [email protected] if issue persists.Error Display Behavior
The SDK handles errors differently depending on when and where they occur:| Error Type | Display | User Action |
|---|---|---|
| Initialization | Full-screen overlay with error code | Copy code, contact support |
| Conversation | In-chat message after 10 auto-retries | Click “Retry” button |
The SDK automatically retries conversation errors up to 10 times before showing the error UI, handling most transient network issues silently.
Reporting to Support
When contacting [email protected], include:1
Error Code
The specific error code (e.g.,
SDK_ERR_1012)2
Page URL
The URL where the error occurred
3
Browser Information
Browser name and version (e.g., Chrome 120, Safari 17)
4
Console Logs
Any additional errors from browser developer tools (press F12 → Console tab)
5
Steps to Reproduce
What you did immediately before the error appeared
Common Error Patterns
Authentication Issues (1001-1006)
Most common cause: Token format is incorrect orfetchAuthentication doesn’t return the right structure.
Quick check:
Agent Not Loading (1011-1014)
Most common cause: Typo inagentUid or agent not published.
Quick check:
- Copy the agent UID directly from Agent Management Studio
- Paste it into your code (don’t type it manually)
- Verify the agent is published (not draft)
Network Problems (1031-1033)
Most common cause: Firewall blocking Firebase or network connectivity issues. Quick check:- Can you access other websites?
- Are you behind a corporate firewall?
- Check status.firebase.google.com for outages
Troubleshooting Workflow
1
Note the error code
Copy the error code shown to the user (e.g.,
SDK_ERR_1012)2
Find the error above
Use the Quick Reference table to locate your error category
3
Check the solution
Follow the specific solution steps for your error code
4
Check browser console
Open developer tools (F12) and check the Console tab for additional details
5
Contact support if needed
If the solution doesn’t resolve the issue, contact [email protected] with the information listed in “Reporting to Support”