Skip to content

Surface FORBIDDEN errors as persistent access warnings#91

Merged
stylessh merged 1 commit intomainfrom
stylessh/track-forbidden-errors
Apr 13, 2026
Merged

Surface FORBIDDEN errors as persistent access warnings#91
stylessh merged 1 commit intomainfrom
stylessh/track-forbidden-errors

Conversation

@stylessh
Copy link
Copy Markdown
Owner

Summary

  • Detects GitHub FORBIDDEN/OAuth App access restriction errors across all API layers and surfaces them as dismissible bottom-bar warnings prompting users to configure organization access.
  • In the cache layer (getOrRevalidateGitHubResource), returns stale cached data on FORBIDDEN errors (30s TTL) instead of crashing — same pattern as rate limit handling. Covers PR detail, issue detail, repo overview, review files, etc.
  • In my-pulls/my-issues search loops, extracts the restricted org name from FORBIDDEN errors and passes forbiddenOrgs to the client via the result type.
  • DashboardErrorScreen now also creates a persistent warning when showing a FORBIDDEN error, so it survives navigation.

Test plan

  • Verify that accessing an org with OAuth restrictions shows a dismissible warning in the bottom bar with "Configure access" action
  • Verify that previously cached pages return stale data instead of error screens when FORBIDDEN occurs
  • Verify that the warning opens the GitHub access dialog when clicked
  • Confirm no type errors (tsc --noEmit) and existing cache tests pass

Detect GitHub FORBIDDEN errors from organizations with OAuth App access
restrictions and surface them as dismissible bottom-bar warnings prompting
the user to configure access, instead of silently dropping data.
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
diffkit dc39b1c Commit Preview URL

Branch Preview URL
Apr 13 2026, 06:09 PM

@stylessh stylessh merged commit a1184e6 into main Apr 13, 2026
4 checks passed
stylessh added a commit that referenced this pull request Apr 18, 2026
Detect GitHub FORBIDDEN errors from organizations with OAuth App access
restrictions and surface them as dismissible bottom-bar warnings prompting
the user to configure access, instead of silently dropping data.
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