Error Codes Reference
Complete reference of BroxiAI error codes, messages, and solutions
This comprehensive reference covers all BroxiAI error codes, their meanings, and specific solutions for each error type.
HTTP Status Codes
Client Error Codes (4xx)
400
Bad Request
Invalid request syntax
Malformed JSON, missing parameters
Check request format and required fields
401
Unauthorized
Authentication failed
Invalid/missing API token
Verify API token validity
403
Forbidden
Access denied
Insufficient permissions
Check account permissions and plan limits
404
Not Found
Resource doesn't exist
Wrong ID, deleted resource
Verify resource ID and existence
405
Method Not Allowed
HTTP method not supported
Using GET instead of POST
Check API documentation for correct method
409
Conflict
Resource conflict
Duplicate resource creation
Check for existing resources
422
Unprocessable Entity
Validation failed
Invalid data format
Validate input data against schema
429
Too Many Requests
Rate limit exceeded
Too many API calls
Implement rate limiting and backoff
Server Error Codes (5xx)
500
Internal Server Error
Server-side issue
System error, bug
Contact support with error details
502
Bad Gateway
Upstream service error
Third-party service down
Check service status, retry later
503
Service Unavailable
Service temporarily down
Maintenance, overload
Check status page, retry later
504
Gateway Timeout
Upstream service timeout
Slow response from services
Retry request, check timeout settings
BroxiAI-Specific Error Codes
Authentication Errors
AUTH_TOKEN_INVALID
{
"error": "AUTH_TOKEN_INVALID",
"message": "The provided authentication token is invalid",
"code": 4001,
"timestamp": "2024-01-01T12:00:00Z"
}Causes:
Token is malformed or corrupted
Token has been revoked
Token is for wrong environment
Solutions:
Regenerate API token from dashboard
Verify token format (should start with
bx_)Check environment (staging vs production)
AUTH_TOKEN_EXPIRED
{
"error": "AUTH_TOKEN_EXPIRED",
"message": "Authentication token has expired",
"code": 4002,
"expired_at": "2024-01-01T10:00:00Z"
}Solutions:
Generate new API token
Implement automatic token refresh
Set up expiration alerts
AUTH_INSUFFICIENT_SCOPE
{
"error": "AUTH_INSUFFICIENT_SCOPE",
"message": "Token lacks required permissions",
"code": 4003,
"required_scope": "workflows:execute",
"current_scope": "workflows:read"
}Solutions:
Regenerate token with required permissions
Contact admin for permission upgrade
Check account plan limits
Workflow Errors
WORKFLOW_NOT_FOUND
{
"error": "WORKFLOW_NOT_FOUND",
"message": "The specified workflow does not exist",
"code": 4041,
"workflow_id": "flow_abc123"
}Causes:
Workflow was deleted
Wrong workflow ID
Workflow not published
Solutions:
Verify workflow ID
Check if workflow is published
Ensure workflow exists in current workspace
WORKFLOW_NOT_PUBLISHED
{
"error": "WORKFLOW_NOT_PUBLISHED",
"message": "Workflow must be published before execution",
"code": 4042,
"workflow_id": "flow_abc123"
}Solutions:
Publish workflow from editor
Check workflow validation errors
Ensure all components are configured
WORKFLOW_EXECUTION_FAILED
{
"error": "WORKFLOW_EXECUTION_FAILED",
"message": "Workflow execution encountered an error",
"code": 5001,
"workflow_id": "flow_abc123",
"execution_id": "exec_xyz789",
"failed_component": "openai_component",
"component_error": "API quota exceeded"
}Solutions:
Check component configuration
Review error logs
Fix failing component
Retry execution
WORKFLOW_TIMEOUT
{
"error": "WORKFLOW_TIMEOUT",
"message": "Workflow execution exceeded timeout limit",
"code": 5002,
"workflow_id": "flow_abc123",
"timeout_seconds": 300,
"elapsed_seconds": 301
}Solutions:
Optimize workflow performance
Increase timeout settings
Break down complex workflows
Use async processing
Component Errors
COMPONENT_CONFIGURATION_ERROR
{
"error": "COMPONENT_CONFIGURATION_ERROR",
"message": "Required parameter is missing or invalid",
"code": 4220,
"component_id": "comp_123",
"component_type": "OpenAI Model",
"missing_parameters": ["api_key"],
"invalid_parameters": {
"temperature": "Must be between 0 and 2"
}
}Solutions:
Provide all required parameters
Validate parameter values
Check parameter format
Review component documentation
COMPONENT_CONNECTION_ERROR
{
"error": "COMPONENT_CONNECTION_ERROR",
"message": "Components cannot be connected due to incompatible data types",
"code": 4221,
"source_component": "text_processor",
"target_component": "number_analyzer",
"source_output_type": "string",
"target_input_type": "number"
}Solutions:
Add data transformation component
Check component compatibility
Verify data type mappings
Review workflow design
COMPONENT_EXECUTION_ERROR
{
"error": "COMPONENT_EXECUTION_ERROR",
"message": "Component failed during execution",
"code": 5003,
"component_id": "comp_123",
"component_type": "File Processor",
"execution_error": "Unsupported file format: .xyz"
}Solutions:
Check component inputs
Verify supported formats
Review component logs
Update component configuration
API Integration Errors
API_KEY_INVALID
{
"error": "API_KEY_INVALID",
"message": "The provided API key for external service is invalid",
"code": 4031,
"service": "OpenAI",
"component_id": "comp_openai_1"
}Solutions:
Verify API key for external service
Check API key permissions
Regenerate API key if needed
Ensure correct environment (test/prod)
API_QUOTA_EXCEEDED
{
"error": "API_QUOTA_EXCEEDED",
"message": "API quota has been exceeded",
"code": 4290,
"service": "OpenAI",
"quota_type": "tokens",
"current_usage": 150000,
"limit": 100000,
"reset_time": "2024-02-01T00:00:00Z"
}Solutions:
Wait for quota reset
Upgrade API plan
Optimize token usage
Implement usage monitoring
API_SERVICE_UNAVAILABLE
{
"error": "API_SERVICE_UNAVAILABLE",
"message": "External API service is temporarily unavailable",
"code": 5030,
"service": "Google Cloud AI",
"retry_after": 300
}Solutions:
Wait and retry after specified time
Check service status page
Implement retry logic
Use alternative service if available
Data Processing Errors
FILE_TOO_LARGE
{
"error": "FILE_TOO_LARGE",
"message": "File exceeds maximum size limit",
"code": 4130,
"file_size": 104857600,
"max_size": 104857600,
"filename": "large_document.pdf"
}Solutions:
Compress file before upload
Split large files into smaller chunks
Use file compression tools
Upgrade plan for larger limits
FILE_FORMAT_UNSUPPORTED
{
"error": "FILE_FORMAT_UNSUPPORTED",
"message": "File format is not supported",
"code": 4131,
"filename": "document.xyz",
"file_extension": ".xyz",
"supported_formats": [".pdf", ".docx", ".txt"]
}Solutions:
Convert file to supported format
Check supported format list
Use file conversion tools
Contact support for format requests
TEXT_PROCESSING_FAILED
{
"error": "TEXT_PROCESSING_FAILED",
"message": "Failed to extract or process text from file",
"code": 5004,
"filename": "corrupted_file.pdf",
"processing_error": "Invalid PDF structure"
}Solutions:
Verify file is not corrupted
Try different file format
Re-create or re-export file
Use OCR for scanned documents
Memory and State Errors
MEMORY_LIMIT_EXCEEDED
{
"error": "MEMORY_LIMIT_EXCEEDED",
"message": "Workflow memory usage exceeded limit",
"code": 5005,
"memory_usage": "2GB",
"memory_limit": "1GB",
"component_id": "large_data_processor"
}Solutions:
Optimize data processing
Process data in smaller chunks
Clear unnecessary variables
Upgrade to higher memory plan
SESSION_EXPIRED
{
"error": "SESSION_EXPIRED",
"message": "User session has expired",
"code": 4014,
"session_id": "sess_abc123",
"expired_at": "2024-01-01T12:00:00Z"
}Solutions:
Re-authenticate user
Implement session refresh
Check session timeout settings
Use persistent authentication
STATE_PERSISTENCE_FAILED
{
"error": "STATE_PERSISTENCE_FAILED",
"message": "Failed to save workflow state",
"code": 5006,
"workflow_id": "flow_abc123",
"storage_error": "Database connection timeout"
}Solutions:
Retry workflow execution
Check storage connectivity
Verify storage permissions
Contact support if persistent
Rate Limiting Errors
RATE_LIMIT_EXCEEDED
{
"error": "RATE_LIMIT_EXCEEDED",
"message": "API rate limit exceeded",
"code": 4290,
"limit": 1000,
"window": "hour",
"current_usage": 1001,
"reset_time": "2024-01-01T13:00:00Z"
}Solutions:
Implement exponential backoff
Spread requests over time
Upgrade to higher rate limits
Use request queuing
CONCURRENT_EXECUTION_LIMIT
{
"error": "CONCURRENT_EXECUTION_LIMIT",
"message": "Maximum concurrent workflow executions exceeded",
"code": 4291,
"current_executions": 5,
"limit": 5
}Solutions:
Wait for current executions to complete
Queue workflow executions
Optimize workflow performance
Upgrade plan for higher limits
Error Response Format
All BroxiAI API errors follow this standard format:
{
"error": "ERROR_CODE",
"message": "Human-readable error description",
"code": 4001,
"timestamp": "2024-01-01T12:00:00Z",
"request_id": "req_abc123",
"details": {
"additional_context": "value"
},
"help_url": "https://docs.broxi.ai/errors/ERROR_CODE"
}Response Fields
error: Machine-readable error code
message: Human-readable error description
code: Numeric error code
timestamp: When the error occurred
request_id: Unique request identifier for support
details: Additional context specific to the error
help_url: Link to specific documentation
Error Handling Best Practices
1. Implement Proper Error Handling
import requests
from typing import Dict, Any
def handle_api_response(response: requests.Response) -> Dict[str, Any]:
"""Handle API response with proper error checking"""
if response.status_code == 200:
return response.json()
# Parse error response
try:
error_data = response.json()
except ValueError:
error_data = {"error": "UNKNOWN_ERROR", "message": response.text}
# Handle specific error codes
error_code = error_data.get("error")
if error_code == "AUTH_TOKEN_INVALID":
# Refresh token and retry
refresh_token()
return retry_request(response.request)
elif error_code == "RATE_LIMIT_EXCEEDED":
# Implement backoff
reset_time = error_data.get("reset_time")
implement_backoff(reset_time)
return retry_request(response.request)
elif error_code == "WORKFLOW_NOT_FOUND":
# Check workflow existence
workflow_id = error_data.get("workflow_id")
verify_workflow_exists(workflow_id)
else:
# Log error and raise exception
log_error(error_data)
raise APIError(error_data)
return error_data2. Implement Retry Logic
import time
import random
from functools import wraps
def retry_on_error(max_retries=3, backoff_factor=1):
def decorator(func):
@wraps(func)
def wrapper(*args, **kwargs):
for attempt in range(max_retries):
try:
return func(*args, **kwargs)
except APIError as e:
error_code = e.error_data.get("error")
# Don't retry on client errors (4xx)
if error_code.startswith("AUTH_") or error_code.startswith("WORKFLOW_NOT_"):
raise
if attempt == max_retries - 1:
raise
# Exponential backoff with jitter
delay = (backoff_factor * (2 ** attempt)) + random.uniform(0, 1)
time.sleep(delay)
return None
return wrapper
return decorator
@retry_on_error(max_retries=3)
def make_api_call():
# Your API call here
pass3. Log Errors Properly
import logging
import json
def log_api_error(error_data: Dict[str, Any], request_context: Dict[str, Any]):
"""Log API errors with context"""
log_entry = {
"error_code": error_data.get("error"),
"error_message": error_data.get("message"),
"request_id": error_data.get("request_id"),
"timestamp": error_data.get("timestamp"),
"context": request_context
}
error_code = error_data.get("error", "")
if error_code.startswith("5"): # Server errors
logging.error(f"Server error: {json.dumps(log_entry)}")
elif error_code.startswith("4"): # Client errors
logging.warning(f"Client error: {json.dumps(log_entry)}")
else:
logging.info(f"API response: {json.dumps(log_entry)}")Debugging Tips
1. Use Request IDs
Every error response includes a request_id. Include this when contacting support:
# Include request ID in support requests
Error occurred with request ID: req_abc1232. Enable Debug Logging
import logging
# Enable debug logging
logging.basicConfig(level=logging.DEBUG)
# Your API calls will now show detailed information3. Test with Minimal Examples
When debugging, create minimal reproduction cases:
# Minimal test case
def test_workflow_execution():
workflow_id = "flow_simple_test"
result = execute_workflow(workflow_id, {"input": "test"})
assert result["status"] == "completed"Getting Help
When encountering errors:
Check this reference for specific error codes
Review error details in the response
Check service status at status.broxi.ai
Contact support with error details and request ID
Support Information to Include:
Complete error response (including request_id)
Steps to reproduce the error
Account/workspace information
Relevant configuration details
Last updated