Error Codes
Complete list of API error codes and their meanings. All errors follow a consistent format to help you handle them programmatically.
Error Response Format
All API errors return a consistent JSON structure:
{
"statusCode": 400,
"code": "ERR_LIMIT_001",
"message": "PDF generation exceeded maximum page limit",
"timestamp": "2025-12-09T10:30:00.000Z",
"path": "/api/attachments/generate",
"relatedInfo": {
"actualPages": 45,
"maxPages": 30,
"message": "PDF generation exceeded 30 page limit. Your PDF has 45 pages."
}
}
| Field | Type | Description |
|---|---|---|
statusCode | number | HTTP status code (400, 401, 403, 404, 429, 500) |
code | string | Unique error code for programmatic handling |
message | string | Human-readable error message |
timestamp | string | ISO 8601 timestamp when error occurred |
path | string | API endpoint that generated the error |
relatedInfo | object | Additional context (varies by error type) |
Generation Limit Errors (ERR_LIMIT_xxx)
These errors occur when document generation exceeds "Safe Harbor" limits. All return 400 Bad Request.
info
See Limits & Quotas for complete limit documentation.
| Code | Error | Description |
|---|---|---|
ERR_LIMIT_001 | PDF Page Limit | PDF generation exceeded maximum page limit |
ERR_LIMIT_002 | PDF Image Limit | PDF contains too many images |
ERR_LIMIT_003 | Excel Row Limit | Excel generation exceeded maximum row limit |
ERR_LIMIT_004 | Excel Sheet Limit | Workbook exceeded maximum sheet limit |
ERR_LIMIT_005 | Excel Column Limit | Sheet exceeded maximum column limit |
ERR_LIMIT_006 | File Size Limit | Generated attachment exceeds safe email size limit |
ERR_LIMIT_007 | Loop Iteration Limit | Loop exceeded maximum iteration limit |
ERR_LIMIT_008 | Nesting Depth | Template exceeded maximum nesting depth |
ERR_LIMIT_009 | Component Count | Template exceeded maximum component count |
Example: PDF Page Limit Error
{
"statusCode": 400,
"code": "ERR_LIMIT_001",
"message": "PDF generation exceeded maximum page limit",
"relatedInfo": {
"actualPages": 45,
"maxPages": 30,
"message": "PDF generation exceeded 30 page limit. Your PDF has 45 pages."
}
}
Example: Loop Iteration Error
{
"statusCode": 400,
"code": "ERR_LIMIT_007",
"message": "Loop exceeded maximum iteration limit",
"relatedInfo": {
"actualIterations": 2500,
"maxIterations": 1000,
"loopId": "items",
"message": "Loop \"items\" has 2,500 items but maximum is 1,000. Consider pagination or splitting data."
}
}
Authentication Errors (ERR_AUTH_xxx)
| Code | HTTP | Description |
|---|---|---|
ERR_AUTH_001 | 401 | You are not authorized to access this resource |
ERR_AUTH_002 | 401 | Invalid email or password |
ERR_AUTH_003 | 401 | Your session has expired. Please login again |
ERR_AUTH_004 | 401 | Invalid authentication token |
ERR_AUTH_005 | 403 | You do not have permission to perform this action |
ERR_AUTH_006 | 403 | Please verify your email address before performing this action |
ERR_AUTH_007 | 400 | Invalid or expired verification token |
ERR_AUTH_008 | 400 | Verification token has expired. Please request a new one |
ERR_AUTH_009 | 400 | Email is already verified |
ERR_AUTH_010 | 400 | Invalid or expired password reset token |
ERR_AUTH_011 | 400 | Password reset token has expired. Please request a new one |
ERR_AUTH_012 | 400 | OTP verification failed |
ERR_AUTH_013 | 429 | Too many OTP requests. Please wait before trying again |
ERR_AUTH_014 | 500 | Failed to send OTP email. Please try again |
ERR_AUTH_015 | 400 | Invalid or unknown token |
ERR_AUTH_016 | 400 | This token has already been used |
Template Errors (ERR_TMPL_xxx)
| Code | HTTP | Description |
|---|---|---|
ERR_TMPL_001 | 404 | Template not found |
ERR_TMPL_002 | 404 | Document template not found |
ERR_TMPL_003 | 404 | Attachment template not found |
ERR_TMPL_004 | 403 | You do not have permission to access this template |
ERR_TMPL_005 | 403 | You do not have permission to edit this template |
ERR_TMPL_006 | 403 | You do not have permission to delete this template |
ERR_TMPL_007 | 403 | You do not have permission to view this template |
ERR_TMPL_008 | 400 | Template schema validation failed |
ERR_TMPL_009 | 400 | Invalid template type |
ERR_TMPL_010 | 400 | Template import data is invalid |
ERR_TMPL_011 | 409 | Template with the same name already exists |
ERR_TMPL_012 | 500 | Template export failed |
ERR_TMPL_013 | 404 | Template version not found |
ERR_TMPL_014 | 400 | Version does not belong to this template |
ERR_TMPL_015 | 400 | No file uploaded for template import |
ERR_TMPL_016 | 400 | Invalid JSON file format |
ERR_TMPL_020 | 400 | No draft version available to publish |
ERR_TMPL_021 | 404 | Template has no published version |
ERR_TMPL_022 | 404 | Template has no draft version |
ERR_TMPL_023 | 400 | Invalid version parameter. Must be "published", "draft", or a version number |
Quota & Rate Limit Errors (ERR_QUOTA_xxx)
| Code | HTTP | Description |
|---|---|---|
ERR_QUOTA_001 | 429 | Monthly document quota exceeded (email) |
ERR_QUOTA_002 | 429 | Monthly document quota exceeded (attachment) |
ERR_QUOTA_003 | 429 | Rate limit exceeded. Please try again later |
ERR_QUOTA_004 | 429 | Storage quota exceeded |
ERR_QUOTA_005 | 429 | Template limit exceeded for your subscription tier |
ERR_QUOTA_006 | 403 | This feature is not available on your subscription tier |
ERR_QUOTA_007 | 429 | Batch size exceeds the maximum allowed for your tier |
ERR_QUOTA_008 | 429 | Monthly document generation quota exceeded |
ERR_QUOTA_009 | 429 | Selection size exceeds the maximum rows per job allowed for your tier |
ERR_QUOTA_010 | 429 | Maximum concurrent jobs limit reached. Please wait for existing jobs to complete |
ERR_QUOTA_011 | 429 | Insufficient document credits. Please purchase more credits or use free quota |
Example: Rate Limit Error
{
"statusCode": 429,
"code": "ERR_QUOTA_003",
"message": "Rate limit exceeded. Please try again later.",
"retryAfter": 45
}
Validation Errors (ERR_VALID_xxx)
| Code | HTTP | Description |
|---|---|---|
ERR_VALID_001 | 400 | Component validation failed |
ERR_VALID_002 | 400 | Variable validation failed |
ERR_VALID_003 | 400 | Formula validation failed |
ERR_VALID_004 | 400 | Schema validation failed |
ERR_VALID_005 | 400 | Required field is missing |
ERR_VALID_006 | 400 | Invalid format |
ERR_VALID_007 | 400 | Potentially dangerous code detected |
ERR_VALID_008 | 400 | Invalid input provided |
User Errors (ERR_USER_xxx)
| Code | HTTP | Description |
|---|---|---|
ERR_USER_001 | 404 | User not found |
ERR_USER_002 | 409 | A user with this email already exists |
ERR_USER_003 | 400 | Invalid email format |
ERR_USER_004 | 409 | An account with this email was recently deleted. Would you like to restore it? |
ERR_USER_005 | 409 | This account is scheduled for permanent deletion |
ERR_USER_006 | 500 | Failed to restore account |
ERR_USER_007 | 400 | This account is not deleted and cannot be restored |
Team Errors (ERR_TEAM_xxx)
| Code | HTTP | Description |
|---|---|---|
ERR_TEAM_001 | 404 | Team not found |
ERR_TEAM_002 | 409 | A team with this slug already exists |
ERR_TEAM_003 | 403 | You are not the owner of this team |
ERR_TEAM_004 | 403 | Personal teams cannot be deleted directly |
ERR_TEAM_005 | 403 | Personal team slug cannot be changed |
ERR_TEAM_006 | 400 | This team is not a personal team |
ERR_TEAM_007 | 409 | User is already a member of this team |
ERR_TEAM_008 | 409 | An invitation has already been sent to this user |
ERR_TEAM_009 | 404 | Invitation not found |
ERR_TEAM_010 | 410 | This invitation has expired |
ERR_TEAM_011 | 404 | Team member not found |
ERR_TEAM_012 | 403 | You cannot remove yourself from the team |
Folder Errors (ERR_FLDR_xxx)
| Code | HTTP | Description |
|---|---|---|
ERR_FLDR_001 | 404 | Folder not found |
ERR_FLDR_002 | 404 | Parent folder not found |
ERR_FLDR_003 | 403 | Parent folder belongs to a different team |
ERR_FLDR_004 | 400 | Maximum folder nesting depth reached |
ERR_FLDR_005 | 400 | Cannot move folder to itself |
ERR_FLDR_006 | 400 | Cannot move folder to its own descendant |
ERR_FLDR_007 | 400 | Cannot delete folder with subfolders |
API Key Errors (ERR_AKEY_xxx)
| Code | HTTP | Description |
|---|---|---|
ERR_AKEY_001 | 404 | API key not found |
ERR_AKEY_002 | 401 | Invalid API key |
ERR_AKEY_003 | 401 | API key has been deactivated |
ERR_AKEY_004 | 403 | You do not have permission to access this API key |
Asset Errors (ERR_ASSET_xxx)
| Code | HTTP | Description |
|---|---|---|
ERR_ASSET_001 | 404 | Asset not found |
ERR_ASSET_002 | 403 | You do not have permission to access this asset |
ERR_ASSET_003 | 400 | Invalid file type |
ERR_ASSET_004 | 404 | Asset folder not found |
ERR_ASSET_005 | 400 | Cannot delete folder containing assets or subfolders |
ERR_ASSET_006 | 400 | File size exceeds maximum limit of 10MB |
Webhook Errors (ERR_WEBHOOK_xxx)
| Code | HTTP | Description |
|---|---|---|
ERR_WEBHOOK_001 | 404 | Webhook subscription not found |
ERR_WEBHOOK_002 | 409 | A webhook subscription with this URL already exists |
ERR_WEBHOOK_003 | 400 | Invalid webhook URL. Must be a valid HTTPS URL |
ERR_WEBHOOK_004 | 400 | Invalid event types specified |
ERR_WEBHOOK_005 | 400 | Maximum number of webhook subscriptions reached |
ERR_WEBHOOK_006 | 400 | Webhook subscription has been disabled due to repeated failures |
ERR_WEBHOOK_007 | 500 | Webhook delivery failed |
ERR_WEBHOOK_008 | 403 | You do not have permission to access this webhook subscription |
ERR_WEBHOOK_009 | 404 | Webhook delivery not found |
Database Errors (ERR_DB_xxx)
| Code | HTTP | Description |
|---|---|---|
ERR_DB_001 | 500 | Database connection failed |
ERR_DB_002 | 500 | Database query failed |
ERR_DB_003 | 409 | Database constraint violation |
System Errors (ERR_SYS_xxx)
| Code | HTTP | Description |
|---|---|---|
ERR_SYS_001 | 500 | An internal server error occurred |
ERR_SYS_002 | 501 | This feature is not yet implemented |
ERR_SYS_003 | 503 | Service temporarily unavailable |
Sheets Add-on Errors (ERR_SHEETS_xxx)
| Code | HTTP | Description |
|---|---|---|
ERR_SHEETS_001 | 404 | Task not found |
ERR_SHEETS_002 | 409 | A task with this name already exists for this spreadsheet |
ERR_SHEETS_003 | 409 | Task has been modified. Please refresh and try again |
ERR_SHEETS_004 | 404 | Execution not found |
ERR_SHEETS_005 | 400 | Invalid spreadsheet ID |
ERR_SHEETS_006 | 403 | You do not have permission to access this task |
Handling Errors
JavaScript/TypeScript
try {
const response = await renderdoc.documents.generate(payload);
} catch (error) {
if (error.code === 'ERR_LIMIT_007') {
// Handle loop iteration limit
console.log(`Loop "${error.relatedInfo.loopId}" has too many items`);
// Consider pagination or splitting data
} else if (error.code === 'ERR_QUOTA_003') {
// Handle rate limit
await sleep(error.retryAfter * 1000);
// Retry the request
} else if (error.code === 'ERR_QUOTA_011') {
// Handle insufficient credits
console.log('Please purchase more document credits');
} else if (error.statusCode === 400) {
// Handle validation errors
console.log('Validation error:', error.message);
}
}
Best Practices
- Check error codes programmatically - Don't rely on error messages, they may change
- Handle rate limits gracefully - Implement exponential backoff
- Validate data client-side - Check array sizes before calling API
- Log relatedInfo - Contains valuable debugging context
Back to API Reference