Skip to content

checkRateLimitBeforeDo prevents roundtripper from waiting #1920

@gauntface

Description

@gauntface

I've been trying to find a way to write a generic RoundTripper that would examine GitHub headers and/or the go-github errors to detect when quota has run out and wait for the quota reset.

Because checkRateLimitBeforeDo get's called and returns early, there isn't a way for the RoundTripper to handle waiting / retries.

The benefit of doing this in the RoundTripper is that it'll apply to all API calls, but without it, each call needs to be wrapped with retry and quota logic.

Is there another approach I can take for this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions