Error Response Format
All error responses follow this consistent structure:HTTP Status Codes
Zipline uses standard HTTP status codes to indicate the success or failure of requests:Success Codes (2xx)
| Code | Status | Description |
|---|---|---|
| 200 | OK | Request succeeded |
| 201 | Created | Resource created successfully |
| 301 | Moved Permanently | Resource has been redirected |
Client Error Codes (4xx)
| Code | Status | Description |
|---|---|---|
| 400 | Bad Request | Invalid request format or parameters |
| 401 | Unauthorized | Missing or invalid authentication |
| 403 | Forbidden | Valid auth but insufficient permissions |
| 404 | Not Found | Requested resource doesn’t exist |
| 413 | Payload Too Large | File or request body exceeds size limits |
| 429 | Too Many Requests | Rate limit exceeded |
Server Error Codes (5xx)
| Code | Status | Description |
|---|---|---|
| 500 | Internal Server Error | Unexpected server error occurred |
Common Error Scenarios
Authentication Errors (401)
No token provided
No token provided
Error:Cause: No Authorization header included in the request.Solution:
Invalid token format
Invalid token format
Error:Cause: Token is malformed or corrupted.Solution: Verify you’re using the correct token from your Zipline dashboard. Copy it again if needed.
Token doesn't match any user
Token doesn't match any user
Error:Cause: Token was valid but doesn’t belong to any user (possibly deleted or regenerated).Solution: Generate a new token from your user settings.
Session expired
Session expired
Error:Cause: Session cookie is missing or expired.Solution: Log in again via
/api/auth/login to get a new session.Permission Errors (403)
Insufficient role permissions
Insufficient role permissions
Error:Cause: User’s role doesn’t have permission for this action. From src/server/middleware/administrator.ts:4-8:Solution: This endpoint requires admin privileges (ADMIN or SUPERADMIN role).
Quota exceeded
Quota exceeded
Error:Cause: File upload would exceed user’s storage quota.Solution: Delete old files or contact your admin to increase your quota.
Folder not accessible
Folder not accessible
Error:Cause: Attempting anonymous upload to a folder that doesn’t allow it.Solution: Authenticate with a valid token or ask the folder owner to enable public uploads.
Validation Errors (400)
Invalid username or password
Invalid username or password
Error:Cause: Login credentials are incorrect.Solution: Double-check your username and password.
Missing required fields
Missing required fields
Error:Cause: Required field missing from request body.Solution: Include all required fields in your request.
Invalid file extension
Invalid file extension
Error:Cause: File type is in the disabled extensions list.Solution: This instance doesn’t allow certain file types. Contact your admin or use an allowed file type.
Duplicate resource
Duplicate resource
Error:Cause: Trying to create a resource with a name that already exists.Solution: Choose a different vanity URL or filename.
Invalid file name
Invalid file name
Error:Cause: Filename contains characters that aren’t allowed.Solution: Remove special characters from the filename.
File Size Errors (413)
File too large
File too large
Error:Cause: File exceeds the configured maximum file size.From src/server/routes/api/upload/index.ts:86-89:Solution:
- Compress the file
- Use chunked upload for large files (
/api/upload/partial) - Ask admin to increase
ZIPLINE_FILES_MAX_FILE_SIZE
Total upload too large
Total upload too large
Error:Cause: Combined size of files exceeds user quota.Solution: Upload fewer files at once or delete old files.
Not Found Errors (404)
Resource not found
Resource not found
Error:Cause: File, URL, user, or other resource doesn’t exist or you don’t have permission to view it.Solution: Verify the resource ID and your permissions.
Endpoint not found
Endpoint not found
Error:Cause: The API endpoint doesn’t exist.Solution: Check the API documentation for correct endpoint paths.
Feature disabled
Feature disabled
Error:Cause: Feature is disabled in instance configuration. For example, from src/server/routes/api/healthcheck.ts:16:Solution: This feature is disabled on this instance. Contact your admin.
Rate Limit Errors (429)
Rate limit exceeded
Rate limit exceeded
Error:Headers:Cause: Too many requests in a short time period.Solution: Wait for the time specified in
Retry-After header, then retry. See Rate Limits for details.Server Errors (500)
Internal server error
Internal server error
Error:Cause: Unexpected error occurred on the server.Solution:
- Retry the request after a short delay
- Check server logs if you’re the admin
- Report the issue if it persists
Database connection error
Database connection error
Error:Cause: Database is unavailable or unreachable.Solution: This is a server-side issue. Contact your instance administrator.
Datasource error
Datasource error
Error:Cause: Storage backend (S3, local filesystem, etc.) encountered an error.Solution: Contact your instance administrator to check datasource configuration and connectivity.
Error Handling Best Practices
1. Always Check Status Codes
2. Implement Retry Logic
3. Validate Input Before Sending
4. Log Errors Appropriately
Error Response Reference
From the source code (src/server/index.ts:241-259), Zipline’s error handler works as follows:Getting Help
If you encounter an error you can’t resolve:- Check the error message and status code
- Review this documentation for the specific error
- Check your instance’s configuration
- Review server logs (if you’re an admin)
- Report issues on GitHub
Next Steps
Authentication
Review authentication methods
Rate Limits
Understand rate limiting
Upload Files
Start uploading files
API Reference
View full API documentation