Error Types
DisGoLink and Lavalink provide several error types:lavalink.Error
HTTP errors from Lavalink REST API:Status: HTTP status codeStatusError: HTTP status textMessage: Error messagePath: API endpoint that failedTimestamp: When the error occurredTrace: Stack trace (if available)
lavalink.Exception
Track loading exceptions:SeverityCommon: Normal errors (e.g., track not found)SeveritySuspicious: Unusual errorsSeverityFault: Serious Lavalink issues
DisGoLink Errors
Client-specific errors:ErrPlayerNoNode: Player has no associated nodeErrNodeAlreadyConnected: Node connection already exists
Connection Errors
Failed to Connect
Common Connection Issues:| Error | Cause | Solution |
|---|---|---|
| Connection refused | Lavalink not running | Start Lavalink server |
| Timeout | Wrong address | Check address and port |
| 401 Unauthorized | Wrong password | Verify password in config |
| SSL error | Secure mismatch | Set Secure: true/false correctly |
Track Loading Errors
Using LoadTracks()
Using LoadTracksHandler()
Playback Errors
Player Update Errors
Track Events
Handle track exceptions during playback:Voice Connection Errors
WebSocket Closed Event
| Code | Meaning | Action |
|---|---|---|
| 1000 | Normal closure | None |
| 4014 | Channel deleted | Destroy player |
| 4015 | Server crashed | Reconnect |
| 4006 | Invalid session | Reconnect with new session |
Timeout Handling
Always use timeouts for potentially slow operations:- Context Timeout
- Retry Logic
Error Recovery Strategies
Node Failure
Graceful Degradation
FAQ
FAQ
Next Steps
Setup Lavalink
Learn about proper Lavalink configuration
Playing Audio
Master the complete playback flow