Skip to content

feat(account): handle password sign-in throttling - #3349

Merged
aofei merged 1 commit into
goplus:devfrom
aofei:account-password-signin-throttle
Aug 3, 2026
Merged

feat(account): handle password sign-in throttling#3349
aofei merged 1 commit into
goplus:devfrom
aofei:account-password-signin-throttle

Conversation

@aofei

@aofei aofei commented Jul 14, 2026

Copy link
Copy Markdown
Member

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 #3340

gemini-code-assist[bot]

This comment was marked as resolved.

fennoai[bot]

This comment was marked as resolved.

Comment thread spx-gui/src/apis/account/index.ts Outdated

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

按现在的构造逻辑,这里 error.meta 不会是 null 只会是 RetryAfterMeta

另外“当 error 是 ApiException 且 code 是 errorTooManyRequests 的时候,error meta 是 RetryAfterMeta”,这个应当是 apis/common 的逻辑(构造这份 error meta 的逻辑也在那里),像已有的 isQuotaExceededMeta 那样维护在 apis/common 会更合适

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以的我来调整下

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread spx-gui/src/components/account/sign-in/password-section/PasswordSection.vue Outdated
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
aofei merged commit 1e56eea into goplus:dev Aug 3, 2026
5 checks passed
@aofei
aofei deleted the account-password-signin-throttle branch August 3, 2026 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add abuse protection for Account password sign-in

2 participants