Skip to content

[Feature Request] Implement automatic account rotation on VALIDATION_REQUIRED errors #1392

@xrf-9527

Description

@xrf-9527

Problem

The current implementation appears to stop processing when the upstream Google API returns a 403 PERMISSION_DENIED error with reason: VALIDATION_REQUIRED. This error typically indicates that the specific account requires manual verification or has been flagged, rendering it temporarily unusable for automation.

Suggested Improvement

It would be beneficial to handle this specific error code by triggering the account rotation logic, similar to how quota exhaustion might be handled.

Proposed Logic:

  1. Intercept 403 responses from the upstream API.
  2. Check if details.reason equals VALIDATION_REQUIRED.
  3. If matched, mark the current session/cookie as invalid or quarantined.
  4. Automatically retry the request with the next available account in the pool.
    Benefit

This would significantly improve the robustness of the proxy when managing multiple accounts, ensuring service continuity even if individual accounts in the pool are flagged.

Example Error Payload:

{
  "code": 403,
  "status": "PERMISSION_DENIED",
  "details": [
    {
      "reason": "VALIDATION_REQUIRED",
      "domain": "cloudcode-pa.googleapis.com"
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions