Errors

Errors you might encounter when using the Mention Me APIs.

Understanding and effectively handling errors is crucial for a robust and reliable integration with our API. This guide provides insights into common errors you might encounter and best practices for resolving them. Refer to the table below for detailed information on each error.

Error Types

CodeMessage
401Expired token or other authentication problem
404Could not find the resource you were querying
429Exceeded a rate limit - slow the number of requests down
500Something's wrong on our end, try again shortly

If you receive a non-200 response from the API, you should check the response body for more information. The response body will be a JSON object with an code key, and a message key.

{
    "code": "401",
    "message": "Expired token."
}

If the error response is not a 401 response, then that means your authentication token is valid, but there is something wrong with your request. You should check the API documentation for more information on the endpoint you're trying to access.

Best Practices for Handling Errors

  1. Error Handling in Code:
    • Implement robust error handling in your code to gracefully manage different error scenarios.
    • Log error details for troubleshooting purposes.
  2. Retry Mechanism:
    • For transient errors (e.g., 429 or 500), implement a retry mechanism with an exponential backoff strategy.
  3. Rate Limiting:
    • Respect rate limits to avoid being temporarily blocked. Implement rate limiting on your end to prevent reaching these limits.
  4. Detailed Error Messages:
    • Extract and display relevant error messages from the API response to assist in debugging.
  5. Monitoring and Alerts:
    • Set up monitoring tools to track error rates and receive alerts when anomalies occur.

What’s Next

Learn about authentication with the Mention Me APIs