Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Error Handling Examples for /users/info in Documentation #6871

Open
RickDeb2004 opened this issue Feb 21, 2025 · 0 comments
Open

Add Error Handling Examples for /users/info in Documentation #6871

RickDeb2004 opened this issue Feb 21, 2025 · 0 comments
Labels
bug For issues that describe a defect or regression in the released software needs triage For issues that are awaiting triage by the core development team

Comments

@RickDeb2004
Copy link

Issue Description

Image

The documentation for the /users/info endpoint in the Mailchimp Transactional API (https://mailchimp.com/developer/transactional/api/users/) lacks examples of error responses, making it difficult for developers to implement proper error handling. When calling /users/info with an invalid API key or under rate-limiting conditions, the API returns errors, but the specific response formats (e.g., JSON structure, HTTP status codes) are not documented. For example, an invalid API key might return {"error": "Invalid API key", "code": 401}, but this isn’t specified. This omission leads to trial-and-error debugging and potential integration failures in production.

Expected behavior: The documentation should include a section with sample error responses (e.g., 401 Unauthorized, 429 Too Many Requests) alongside success examples, similar to other well-documented APIs.

Steps to Reproduce

  1. Use a Node.js client (e.g., @mailchimp/mailchimp-transactional) or cURL to call the /users/info endpoint with an invalid API key:
    curl -X GET "https://mandrillapp.com/api/1.0/users/info.json" --data "key=INVALID_KEY"

@RickDeb2004 RickDeb2004 added bug For issues that describe a defect or regression in the released software needs triage For issues that are awaiting triage by the core development team labels Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For issues that describe a defect or regression in the released software needs triage For issues that are awaiting triage by the core development team
Projects
None yet
Development

No branches or pull requests

1 participant