feat(account): handle password sign-in throttling - #3349
Merged
Conversation
aofei
force-pushed
the
account-password-signin-throttle
branch
from
July 14, 2026 11:13
f3b9939 to
9b6b8a6
Compare
aofei
force-pushed
the
account-password-signin-throttle
branch
from
July 28, 2026 10:57
9b6b8a6 to
32f1017
Compare
aofei
marked this pull request as ready for review
July 28, 2026 10:57
nighca
reviewed
Aug 3, 2026
|
|
||
| export function getPasswordSignInRetryAfter(error: unknown): number | null { | ||
| if (!(error instanceof ApiException) || error.code !== ApiExceptionCode.errorTooManyRequests) return null | ||
| const retryAfter = (error.meta as RetryAfterMeta | null)?.retryAfter |
Collaborator
There was a problem hiding this comment.
按现在的构造逻辑,这里 error.meta 不会是 null 只会是 RetryAfterMeta?
另外“当 error 是 ApiException 且 code 是 errorTooManyRequests 的时候,error meta 是 RetryAfterMeta”,这个应当是 apis/common 的逻辑(构造这份 error meta 的逻辑也在那里),像已有的 isQuotaExceededMeta 那样维护在 apis/common 会更合适
Member
Author
There was a problem hiding this comment.
Handle password sign-in throttle responses without reporting them as unexpected failures. Disable resubmission until the server-provided retry time expires while keeping credentials editable. Document the `42900` and `Retry-After` response contract and cover retry metadata parsing and countdown behavior. Fixes goplus#3340 Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
aofei
force-pushed
the
account-password-signin-throttle
branch
from
August 3, 2026 05:19
32f1017 to
860259f
Compare
nighca
approved these changes
Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Handle password sign-in throttle responses without reporting them as unexpected failures. Disable resubmission until the server-provided retry time expires while keeping credentials editable.
Document the
42900andRetry-Afterresponse contract and cover retry metadata parsing and countdown behavior.Fixes #3340