Skip to main content
The Zipline API uses standard HTTP status codes and returns detailed error messages in JSON format to help you diagnose and handle errors effectively.

Error Response Format

All error responses follow this consistent structure:
For validation errors (Zod schema validation), the response includes additional details:

HTTP Status Codes

Zipline uses standard HTTP status codes to indicate the success or failure of requests:

Success Codes (2xx)

Client Error Codes (4xx)

Server Error Codes (5xx)

Common Error Scenarios

Authentication Errors (401)

Error:
Cause: No Authorization header included in the request.Solution:
Error:
Cause: Token is malformed or corrupted.Solution: Verify you’re using the correct token from your Zipline dashboard. Copy it again if needed.
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.
Error:
Cause: Session cookie is missing or expired.Solution: Log in again via /api/auth/login to get a new session.

Permission Errors (403)

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).
Error:
Cause: File upload would exceed user’s storage quota.Solution: Delete old files or contact your admin to increase your quota.
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)

Error:
Cause: Login credentials are incorrect.Solution: Double-check your username and password.
Error:
Cause: Required field missing from request body.Solution: Include all required fields in your request.
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.
Error:
Cause: Trying to create a resource with a name that already exists.Solution: Choose a different vanity URL or filename.
Error:
Cause: Filename contains characters that aren’t allowed.Solution: Remove special characters from the filename.

File Size Errors (413)

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
Error:
Cause: Combined size of files exceeds user quota.Solution: Upload fewer files at once or delete old files.

Not Found Errors (404)

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.
Error:
Cause: The API endpoint doesn’t exist.Solution: Check the API documentation for correct endpoint paths.
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)

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)

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
Error:
Cause: Database is unavailable or unreachable.Solution: This is a server-side issue. Contact your instance administrator.
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:
  1. Check the error message and status code
  2. Review this documentation for the specific error
  3. Check your instance’s configuration
  4. Review server logs (if you’re an admin)
  5. 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