Skip to main content

Error Handling

Understanding and handling errors is crucial for building robust integrations with the Billbora API. This guide covers all error types, response formats, and best practices.

Error Response Format

All Billbora API errors follow a consistent JSON structure:

HTTP Status Codes

  • 200 OK: Request successful
  • 201 Created: Resource created successfully
  • 204 No Content: Resource deleted successfully
  • 400 Bad Request: Invalid request parameters
  • 401 Unauthorized: Authentication required
  • 403 Forbidden: Insufficient permissions
  • 404 Not Found: Resource not found
  • 409 Conflict: Resource conflict (duplicate data)
  • 422 Unprocessable Entity: Validation failed
  • 429 Too Many Requests: Rate limit exceeded
  • 500 Internal Server Error: Unexpected server error
  • 502 Bad Gateway: Upstream service error
  • 503 Service Unavailable: Service temporarily unavailable
  • 504 Gateway Timeout: Request timeout

Common Error Codes

Authentication Errors

Validation Errors

Resource Errors

Rate Limiting

rate_limit_exceeded

Error Handling Best Practices

1. Always Check Status Codes

2. Handle Specific Error Types

3. Implement Retry Logic

Rate Limiting

Understanding Rate Limits

Billbora implements rate limiting to ensure fair usage:
  • General API: 1,000 requests per hour per user
  • Authentication: 10 requests per minute per IP
  • Bulk operations: 100 requests per hour per user

Rate Limit Headers

Every API response includes rate limit information:

Handling Rate Limits

Debugging API Errors

1. Use Request IDs

Every API response includes a request ID for debugging:
When contacting support, always include the request ID.

2. Enable Request Logging

3. Validation Error Details

For validation errors, the API provides detailed field-level error messages:
Use these details to show specific error messages to users.

Error Recovery Strategies

1. Graceful Degradation

2. Offline Support

Getting Help

When you encounter errors that you can’t resolve:

Check Status Page

See if there are any ongoing service issues

Search Documentation

Look up specific error codes and solutions

Community Forum

Ask questions and get help from other developers

Contact Support

Reach out to our support team with request IDs
Pro Tip: Always include the request ID when reporting issues. It helps our support team diagnose problems much faster.