app-store-server-library-python icon indicating copy to clipboard operation
app-store-server-library-python copied to clipboard

Missing Retry-After in response headers

Open chrisballinger opened this issue 1 month ago • 0 comments

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

chrisballinger avatar Nov 10 '25 19:11 chrisballinger