The Kini API is designed to provide clear and actionable error messages to help you diagnose and resolve issues quickly. This guide outlines the common error codes, their meanings, and best practices for handling them.
Common Error Codes
1. Authentication Errors
Status Code
Error Message
Resolution
401
Unauthorized
Ensure the Authorization header contains a valid token. Use /token/refresh/ or /token/if the token has expired.
403
Forbidden
Verify the user’s permissions for the requested endpoint.
2. Validation Errors
Status Code
Error Message
Description
Resolution
400
Invalid Input
Request body or query parameters are malformed.
Validate the request payload against the API specification.
400
Missing Required Field
A required field is missing in the request payload.
Include all mandatory fields as specified in the API documentation.
3. Rate Limiting
Status Code
Error Message
Description
Resolution
429
Too Many Requests
Exceeded the allowed number of requests per minute.
Implement retry logic with exponential backoff. Monitor usage to stay within rate limits.
4. Server Errors
Status Code
Error Message
Description
Resolution
500
Internal Server Error
Unexpected error occurred on the server.
Retry the request after a short delay. If the issue persists, please contact support.
503
Service Unavailable
The server is temporarily overloaded or down.
Wait and retry after a few minutes. If the issue persists, please contact support.
Error Response Format
All error responses from the Kini API follow a standard format for consistency and ease of debugging.