Error Response Format
Failed requests returnstatus: false with a descriptive message:
HTTP Status Codes
Bila uses standard HTTP status codes.Success Codes
Client Error Codes
Server Error Codes
Common Error Messages
Authentication Errors
Validation Errors
Resource Not Found
Duplicate Reference
Insufficient Balance
Handling Errors
Best Practices
Always check the status field
Always check the status field
Don’t rely solely on HTTP status codes. Always check the
status field in the response body.Log error messages
Log error messages
Log the error
message for debugging purposes.Implement retry logic
Implement retry logic
For
5xx errors and rate limiting, implement exponential backoff retry logic.Handle edge cases
Handle edge cases
Account for scenarios like network timeouts, invalid JSON responses, and service unavailability.
