Error Response Format
All error responses from the SuperBox API follow a consistent structure:HTTP Status Codes
4xx Client Errors
4xx Client Errors
Errors caused by invalid client requests
Error Codes Reference
Authentication Errors
Validation Errors
Resource Errors
Rate Limiting Errors
Repository Errors
Security Errors
Payment Errors
Server Errors
Service temporarily unavailable
Error Handling Best Practices
1. Always Check Response Status
2. Implement Retry Logic
3. Handle Rate Limiting
4. Validate Input Before Sending
5. Log Errors for Debugging
Common Error Scenarios
Scenario 1: Creating a Server with Invalid Name
Scenario 1: Creating a Server with Invalid Name
Request:Response: Solution: Use a valid name:
400 Bad Requestmy-serverScenario 2: Token Expired During Request
Scenario 2: Token Expired During Request
Request:Response: Solution: Refresh your Firebase token and retry
401 UnauthorizedScenario 3: Deleting Someone Else's Server
Scenario 3: Deleting Someone Else's Server
Request:Response: Solution: You can only delete servers you own
403 ForbiddenScenario 4: Rate Limit Exceeded
Scenario 4: Rate Limit Exceeded
Request:Response: Solution: Wait for rate limit reset or implement exponential backoff
429 Too Many RequestsSupport
If you encounter an error you can’t resolve:Contact Support
Include your error details for faster resolution
GitHub Issues
Report bugs or request features
With proper error handling, your integration will be robust and user-friendly!