Error Response Format
All error responses from the SuperBox API follow a consistent structure:boolean
Always
false for errorsstring
Machine-readable error code (uppercase with underscores)
string
Human-readable error description
object
Additional context and debugging information
string
Unique request identifier for support inquiries
HTTP Status Codes
4xx Client Errors
4xx Client Errors
Errors caused by invalid client requests
error
Invalid request parameters, body, or format
error
Missing, invalid, or expired authentication token
error
Valid authentication but insufficient permissions
error
Requested resource does not exist
error
Resource already exists or conflicting state
error
Valid request format but semantic errors
error
Rate limit exceeded
Error Codes Reference
Authentication Errors
401
No authentication token provided
401
Token is malformed or invalid
401
Token has expired
403
Insufficient permissions for the requested action
Validation Errors
400
Request validation failed
400
Required field is missing
400
Field format is invalid
Resource Errors
404
Requested resource doesn’t exist
409
Resource with the same identifier already exists
409
Resource is in a conflicting state
Rate Limiting Errors
429
API rate limit exceeded
Check
X-RateLimit-* headers for rate limit informationRepository Errors
422
Cannot access the Git repository
422
Repository doesn’t have valid MCP server structure
Security Errors
422
Security scan found critical issues
422
Secret keys or credentials found in code
Payment Errors
402
Payment required to access this server
422
Payment processing failed
Server Errors
500
Unexpected server error
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!