Skip to content

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

@RickDeb2004

Description

@RickDeb2004

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugFor issues that describe a defect or regression in the released softwareneeds triageFor issues that are awaiting triage by the core development team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions