Error Display Philosophy
When an AI streaming error occurs, Artifact Chat displays it as an assistant message bubble in the conversation. This approach:- Feels Conversational: The error is part of the dialogue, not a system interruption
- Preserves Context: You see your query and the error response together
- Less Alarming: Errors feel like “I couldn’t help with that” vs. “SYSTEM ERROR”
- Natural Retry UX: The retry button appears inline, like continuing the conversation
This approach mimics how a helpful assistant would naturally communicate when something goes wrong.
Error Types
Artifact Chat categorizes errors into four main types:Network Errors
Connection issues, server unreachable, or timeouts.| Indicator | Color |
|---|---|
| Icon | Red exclamation |
| Background | Light red/pink |
- Internet connection issues
- Server temporarily unavailable
- Request timeout
Rate Limit Errors
Too many requests or quota exceeded.| Indicator | Color |
|---|---|
| Icon | Blue clock |
| Background | Light blue |
- Exceeded API rate limits
- Usage quota reached
- Too many concurrent requests
Safety Errors
Content policy violations or safety filter triggers.| Indicator | Color |
|---|---|
| Icon | Yellow warning |
| Background | Light yellow |
- Content policy violation
- Safety filter triggered
- Inappropriate request
General Errors
Unknown or uncategorized errors.| Indicator | Color |
|---|---|
| Icon | Red alert |
| Background | Light red |
- Unexpected server error
- Unknown issue
Retry Logic
Artifact Chat automatically determines whether an error is retryable:Retryable Errors
These errors can typically be resolved by trying again:- Network connectivity issues
- Timeout errors
- Server 5xx errors
- Temporary service disruptions
Non-Retryable Errors
These errors require different action:- Rate limits (wait before retrying)
- Authentication errors (check credentials)
- Content policy violations (modify request)
User-Friendly Messages
All error messages shown to users are non-technical and helpful:| Technical Error | User-Friendly Message |
|---|---|
ECONNREFUSED | ”I’m having trouble connecting. Please check your internet connection.” |
429 Too Many Requests | ”I’m receiving too many requests right now. Please wait a moment.” |
500 Internal Server Error | ”Something went wrong on my end. Please try again.” |
Content filtered | ”I wasn’t able to respond to that request. Please rephrase your question.” |
Handling Errors as a User
When you encounter an error:For Network Errors
- Check your internet connection
- Wait a few seconds
- Click the Retry button
For Rate Limit Errors
- Wait for the suggested cooldown period
- Reduce request frequency
- Try again after waiting
For Safety Errors
- Review your request
- Rephrase to avoid potentially problematic content
- Submit a new request
For General Errors
- Try the request again
- If it persists, try a different approach
- Report the issue if it continues
Error Recovery Tips
Refresh the Page
A page refresh can resolve temporary state issues
Check Connection
Ensure you have a stable internet connection
Wait and Retry
Many errors resolve with a brief wait
Simplify Request
Try a simpler or shorter request
Best Practices
- Don’t Panic: Most errors are temporary and resolve quickly
- Read the Message: Error messages provide guidance on what to do
- Use Retry When Available: The retry button handles everything automatically
- Wait for Rate Limits: Respect rate limit cooldowns to avoid extended delays
- Rephrase if Needed: Safety errors often just need a different approach
