Skip to content

Missing Retry-After in response headers #167

@chrisballinger

Description

@chrisballinger

In order to properly implement rate-limiting per these docs: https://developer.apple.com/documentation/retentionmessaging/identifying-rate-limits

We need to expose the response headers like this to access the Retry-After value

@define
class APIException(Exception):
    http_status_code: int
    api_error: Optional[APIError]
    raw_api_error: Optional[int]
    error_message: Optional[str]
    response_headers: Optional[Dict[str, str]] = None # <---- add this

Will submit a PR shortly to add this functionality

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions