Response contract
Read the error object
When a request fails, the JSON response returns status as false. Use the numericerrno for application logic and keep errmsg for logs or human-readable diagnostics.
{
"status": false,
"errno": 94,
"errmsg": "invalid or missing key"
}errno, not the exact wording of errmsg. This keeps your integration predictable if explanatory text changes later.Complete reference
GenderAPI error codes
The following values match the current public GenderAPI documentation. Correct the cause before repeating a request.
access deniedThe request came from an unauthorized IP address or referrer.
invalid country codeThe country value is not a supported ISO 3166-1 alpha-2 code.
name not set || email not set || username not setThe request is missing its required name, email or username parameter.
too many names || too many emails || too many usernamesThe request exceeds the batch limit: 100 names, 50 emails or 50 usernames.
query limit reachedThe API key has no credits remaining.
invalid or missing keyThe API key is missing or cannot be found.
API key has expiredThe package associated with the API key has expired.
Handling guidance
Fail safely and avoid blind retries
Validate first
Reject missing inputs, invalid country codes and oversized batches before they reach the API.
Protect credentials
Keep API keys on the server and redact them from application logs, browser output and support screenshots.
Retry selectively
These errors require correction or account action. Repeating the same request unchanged will not resolve them.
type GenderApiError = {
status: false;
errno: number;
errmsg: string;
};
if (response.status === false) {
handleGenderApiError(response.errno, response.errmsg);
}Keep diagnostic details private
Log the error number with an internal request identifier, but never include the API key. Show users a concise, actionable message instead of exposing raw credentials or internal request data.
Documentation complete