Authentication Issues
Invalid API key
Problem: Receiving401 Unauthorized errors.
- Verify your API key is correct
- Check the
Authorizationheader format:Authorization: Bearer $HOPX_API_KEY - Ensure no extra spaces or newlines in the API key
- Generate a new API key from the dashboard
Expired JWT Token
Problem: VM Agent API returns401 with expired token error.
Solution: Refresh the JWT token using the Control Plane API:
Sandbox Creation Issues
Sandbox Stuck in “Creating” Status
Problem: Sandbox status remains “creating” for more than 2 minutes. Solutions:- Wait up to 5 minutes for large templates
- Check template status - ensure it’s “active”
- Try a different region if available
- Delete and recreate the sandbox
Template Not Found
Problem:404 Template not found when creating sandbox.
- List available templates to find valid IDs
- Use template
nameinstead of ID - Check if template is active
Resource Limits Exceeded
Problem: Cannot create more sandboxes.- Delete unused sandboxes
- Upgrade your plan for higher limits
- Use sandbox pooling/reuse
Code Execution Issues
Execution Timeout
Problem: Code execution times out.- Increase the timeout parameter
- Optimize your code
- Use background execution for long tasks
Import/Module Errors
Problem: Python packages not found.- Install packages before use
- Use a template with pre-installed packages
- Check package spelling
File Operation Issues
Path Not Allowed
Problem:403 Forbidden when accessing files.
- Only access allowed paths:
/workspace,/tmp - Use relative paths from allowed directories
File Not Found
Problem: File doesn’t exist when trying to read. Solutions:- Check if file exists first
- Create the file before reading
- Verify the file path
Connection Issues
Network Timeout
Problem: Requests timing out. Solutions:- Increase client timeout
- Check network connectivity
- Use retry logic with exponential backoff
SSL Certificate Errors
Problem: SSL verification failures. Solutions:- Update your SSL certificates
- Update your HTTP client library
- Check system time (certificate validation depends on correct time)
Rate Limiting
Rate Limit Exceeded
Problem:429 Too Many Requests errors.
- Implement exponential backoff
- Respect the
retry_afterheader - Distribute requests over time
- Cache responses when possible
Debugging Tips
Enable Verbose Logging
Check Request ID
Every response includes arequest_id for debugging:
request_id when contacting support.
Inspect Full Response
Test with cURL First
Before implementing in your application, test with cURL:Getting Help
If you’re still experiencing issues:- Check Status Page - https://status.hopx.dev
- Review Documentation - Complete API reference
- Contact Support - Include:
- Request ID
- Timestamp
- Full error message
- Code snippet (remove sensitive data)
- Expected vs actual behavior
Common Patterns
Healthcheck Pattern
Cleanup Pattern
Related
- Error Handling - Understand error codes and responses
- Rate Limits - Handle rate limit issues
- Authentication - Fix authentication problems
- API Introduction - Learn about the HopX API
- Python SDK Quickstart - Use the Python SDK (simpler error handling)
- CLI Reference - Command-line interface
Next Steps
- Errors - Complete error reference
- Rate Limits - Rate limiting details
- Data Model - Core resources

