Skip to main content
Pterodactyl API returns standardized error responses to help you diagnose and handle issues in your applications.

Error Response Format

All error responses follow a consistent JSON structure:
Fields:
  • code: Machine-readable error code
  • status: HTTP status code as a string
  • detail: Human-readable error message
  • meta: Additional context (optional)

HTTP Status Codes

Success Codes

Client Error Codes

Server Error Codes

Common Error Types

Authentication Errors

401 Unauthorized

Cause: Missing or invalid API key
Solutions:
  • Verify API key is included in Authorization: Bearer {key} header
  • Check that the API key hasn’t expired
  • Ensure the key hasn’t been deleted

403 Forbidden - IP Restriction

Cause: Request from unauthorized IP address
Solutions:
  • Add your IP address to the API key’s allowed IPs
  • Remove IP restrictions if appropriate

403 Forbidden - Insufficient Permissions

Cause: API key lacks required permissions
Solutions:
  • Update Application API key permissions
  • Verify user has access to the server (Client API)

Validation Errors

422 Unprocessable Entity

Cause: Request data failed validation
Solutions:
  • Review the source_field to identify which field failed
  • Check the rule to understand the validation requirement
  • Correct the request data and retry

Resource Errors

404 Not Found

Cause: Requested resource doesn’t exist
Solutions:
  • Verify the resource ID is correct
  • Check that the resource hasn’t been deleted
  • For servers, ensure you have access permissions

409 Conflict

Cause: Request conflicts with current resource state
Common Conflicts:
  • Server is being transferred
  • Server is installing
  • Backup is already running
  • Resource is locked

Rate Limiting

429 Too Many Requests

Cause: Exceeded rate limit
Headers:
Solutions:
  • Wait for the time specified in Retry-After header
  • Implement exponential backoff
  • Reduce request frequency
  • See Rate Limiting for details

Service Limits

Service Limit Exceeded

Cause: Reached resource limit
Common Limits:
  • Maximum 10 tasks per schedule
  • Maximum 25 API keys per user
  • Server-specific backup limits
  • Database limits

Server State Errors

403 Forbidden - Server State

Cause: Server in wrong state for operation
Common States:
  • Server is installing
  • Server is transferring
  • Server is suspended
  • Server is being restored

Bad Request Errors

400 Bad Request - Invalid JSON

Cause: Malformed JSON in request body
Solutions:
  • Validate JSON syntax before sending
  • Ensure Content-Type: application/json header is set
  • Check for trailing commas or unclosed brackets

400 Bad Request - Missing Parameter

Gateway Errors

502 Bad Gateway

Cause: Panel cannot communicate with Wings
Solutions:
  • Verify Wings is running on the node
  • Check network connectivity between Panel and Wings
  • Verify Wings configuration
  • Check Wings logs for errors

Error Handling Best Practices

1. Always Check Status Codes

2. Parse Error Details

3. Implement Retry Logic

4. Handle Specific Errors

Common Troubleshooting

”Failed to validate reCAPTCHA data”

This error appears when reCAPTCHA validation fails. This only affects web-based login, not API requests.

”Two-factor authentication is required”

Ensure 2FA is properly set up on your account. API keys should work regardless of 2FA status.

”Server is not installed yet”

Wait for server installation to complete before performing most operations.

”Wings response handling error”

Check that Wings is running and accessible from the Panel. Verify TLS certificates if using HTTPS.