Exception hierarchy
All rebootpy exceptions inherit fromFortniteException:
Common exceptions
HTTPException
Raised when HTTP requests to Epic Games services fail:404- Resource not found403- Forbidden/not authorized429- Rate limited500- Server error
AuthException
Raised when authentication fails:PartyError
Raised for party-related errors:Friendship exceptions
NotFound and Forbidden
Handling errors in events
Global error handler
Handle all uncaught exceptions in events:Specific event error handling
Handle errors within specific events:Command error handling
The commands extension provides special error handling:Global command error handler
Per-command error handlers
Retry logic
Implement retry logic for transient errors:Graceful degradation
Provide fallback behavior when operations fail:Validation
Validate inputs before making API calls:Logging
Use Python’s logging module for better error tracking:Best practices
Always handle exceptions
Always handle exceptions
Don’t let exceptions crash your bot. Handle them gracefully and provide feedback.
Use specific exception types
Use specific exception types
Catch specific exceptions rather than catching all exceptions:
Log errors for debugging
Log errors for debugging
Always log errors with full context to help with debugging:
Provide user feedback
Provide user feedback
When errors occur, inform users what went wrong in a user-friendly way:
Don't suppress errors silently
Don't suppress errors silently
If you catch an exception, either handle it or re-raise it:
Next steps
Exceptions reference
Complete exception documentation
Command errors
Commands extension error handling
Events reference
Learn about the event system
Client reference
Client class documentation