Skip to content

Request-level THROTTLED errors lose retryAfter #491

Open

Description

@leogdion

CloudKit sends retryAfter with THROTTLED / TRY_AGAIN_LATER. MistKit decodes it in the per-record error schema, but the top-level ErrorResponse doesn't declare it. A request that fails outright as throttled therefore reaches callers without the server's back-off time.

Proposal: add retryAfter to ErrorResponse, expose it on the throttled/try-again CloudKitError cases (for example retryAfter: TimeInterval?), and add a test with a recorded response.

Found while building brightdigit/Mistico (vendored at Packages/MistKit, branch mistico from v1.0.0-beta.6). Tracked in brightdigit/Mistico#106.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglibrary-apiLibrary API design

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions