All plans have 30% OFF For this week

Claim Discount

Foutcodes

API Reference: Error Codes

The AnswerPal API uses standard HTTP status codes to indicate the success or failure of API requests. This page lists all common error codes, explains their meaning, and provides best practices for handling errors in your integration. For endpoint-specific error codes, refer to the relevant API documentation section.

Common Error Codes

Status Code Error Name Description Example Solution
400 Bad Request The request could not be understood due to invalid input, missing parameters, or validation errors. Check input data and required fields.
401 Unauthorized Authentication failed or was not provided. Token may be missing, expired, or invalid. Check your Authorization header and credentials. Re-authenticate if needed.
403 Forbidden Authenticated but not permitted to access the resource. Contact your admin or support to verify your access rights.
404 Not Found The requested resource does not exist. Check the resource ID or URL.
409 Conflict Duplicate or conflicting resource (e.g., trying to create a resource with the same unique field). Ensure the resource does not already exist or resolve conflicts.
415 Unsupported Media Type The uploaded file type is not supported. Use a supported file format (e.g., PDF, PNG).
500 Internal Server Error Unexpected server-side error. Retry later or contact support if the issue persists.
    • 401 Ongeautoriseerd: De API aanroep werd gedaan zonder geldige inloggegevens of met een verlopen/ongeldige token. Oplossing: Check je Autorisatie-header en zorg dat je token of inloggegevens correct en niet verlopen zijn.
    • 403 Verboden: De inloggegevens zijn geldig maar missen toestemming voor de gevraagde bron. Oplossing: Neem contact op met je beheerder of support om je toegangsrechten te controleren.
    • Token verlopen: JWT tokens zijn tijdgebonden. Als je een token verlopen fout krijgt, log opnieuw in om een nieuwe token te krijgen.
    • 400 Foute aanvraag: Ontbrekende of ongeldige parameters, validatiefouten of ID mismatch. Oplossing: Check je invoergegevens en zorg dat alle verplichte velden zijn ingevuld.
    • 404 Niet gevonden: De gevraagde bron bestaat niet. Oplossing: Check het bron-ID, pad of URL.
    • 409 Conflict: Dubbele of conflicterende bron (bijv. bestaat al). Oplossing: Zorg dat er geen dubbele zijn en los eventuele conflicten op.
    • 415 Niet-ondersteund mediatype: Het geüploade bestandstype wordt niet ondersteund. Oplossing: Gebruik een ondersteund bestandsformaat (zie documentatie voor toegestane types).
    • 500 Interne serverfout: Er is een onverwachte fout opgetreden op de server. Oplossing: Probeer het later opnieuw of neem contact op met support als het probleem aanhoudt.

Best Practices for Handling API Errors

  • Always validate input data before making API requests.
  • Handle authentication errors by prompting users to re-authenticate.
  • Log all error responses for troubleshooting and auditing.
  • Use secure storage for API credentials and tokens.
  • Implement retry logic for transient errors (e.g., 500 Internal Server Error).
  • Contact support if you encounter persistent or undocumented errors.

Example Error Responses

Elementor Code Block Paste the following:

{

"status": 401,

"error": "Unauthorized",

"message": "The API call was made without valid credentials or with an expired/invalid token."

}

{

"status": 400,

"error": "Bad Request",

"message": "Missing required parameter: sourceText."

}

{

"status": 404,

"error": "Not Found",

"message": "The requested resource does not exist."

}

FAQ

Controleer je inloggegevens en zorg dat je token geldig is en niet verlopen.

Zorg dat je geen dubbele resource aanmaakt of update de conflicterende gegevens.

Probeer het verzoek later opnieuw. Als de fout aanhoudt, neem contact op met support.

Table of Contents

AnswerPal: AI-powered customer service solutions to elevate your support and communication effortlessly.

Contact

For all support, sales, and partnership inquiries, email us at info@answerpal.eu