mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-12 23:17:44 +00:00
have errors for too many requests too
This commit is contained in:
parent
9b0a884245
commit
b0f7f6fccb
2 changed files with 4 additions and 0 deletions
|
@ -57,6 +57,7 @@ var (
|
|||
401: ErrOauthRevoked,
|
||||
403: ErrOauthRevoked,
|
||||
404: ErrSubredditNotFound,
|
||||
429: ErrTooManyRequests,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -426,6 +427,7 @@ func (rac *AuthenticatedClient) markRateLimited(rli *RateLimitingInfo) error {
|
|||
func (rac *AuthenticatedClient) RefreshTokens(ctx context.Context, opts ...RequestOption) (*RefreshTokenResponse, error) {
|
||||
errmap := map[int]error{
|
||||
400: ErrOauthRevoked,
|
||||
429: ErrTooManyRequests,
|
||||
}
|
||||
|
||||
opts = append(rac.client.defaultOpts, opts...)
|
||||
|
|
|
@ -31,4 +31,6 @@ var (
|
|||
ErrSubredditIsQuarantined = errors.New("subreddit is quarantined")
|
||||
// ErrSubredditNotFound .
|
||||
ErrSubredditNotFound = errors.New("subreddit not found")
|
||||
// ErrTooManyRequests .
|
||||
ErrTooManyRequests = errors.New("too many requests")
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue