Add Error Handling Examples for /users/info in Documentation #6871
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
Issue Description
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
@mailchimp/mailchimp-transactional
) or cURL to call the/users/info
endpoint with an invalid API key:The text was updated successfully, but these errors were encountered: