Skip to content

fix: propagate actual 403 reason from Google API#2272

Open
thebtf wants to merge 2 commits intolbjlaq:mainfrom
thebtf:fix/403-error-reason
Open

fix: propagate actual 403 reason from Google API#2272
thebtf wants to merge 2 commits intolbjlaq:mainfrom
thebtf:fix/403-error-reason

Conversation

@thebtf
Copy link
Copy Markdown

@thebtf thebtf commented Mar 6, 2026

Summary

  • Read and store the actual HTTP response body when Google API returns 403, instead of using hardcoded "403 Forbidden" messages
  • Affects quota fetch (quota.rs), scheduler warmup (scheduler.rs), and proxy handler (claude.rs)
  • Users can now see the specific reason (e.g. TOS_VIOLATION, VALIDATION_REQUIRED) in the error dialog

Changes

  • quota.rs: Read response body on 403 and store in QuotaData.forbidden_reason
  • scheduler.rs: Use forbidden_reason from quota data instead of hardcoded string (2 locations)
  • claude.rs: Include first 500 chars of error body in proxy handler log message

Test plan

  • Add account that returns 403 → error dialog should show specific Google API reason
  • Check debug logs for detailed 403 messages
  • Verify scheduler warmup logs include actual reason

thebtf added 2 commits March 6, 2026 12:05
… message

Previously, when quota fetch returned 403, the response body was
discarded and a generic "quota fetch denied" string was stored as
forbidden_reason. Now the actual API response body is read and
propagated through QuotaData.forbidden_reason → mark_account_forbidden
→ frontend AccountErrorDialog, which already parses JSON error messages.
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.

1 participant