Skip to content

Dev open-access mode + bill fetch error handling#72

Open
mikaalnaik wants to merge 1 commit into
mainfrom
mikaal/stability-error-handling
Open

Dev open-access mode + bill fetch error handling#72
mikaalnaik wants to merge 1 commit into
mainfrom
mikaal/stability-error-handling

Conversation

@mikaalnaik

Copy link
Copy Markdown
Collaborator

Summary

  • Add a DEV_OPEN_ACCESS guard (NODE_ENV !== "production") so admin/edit access is fully open locally. The session/allowlist checks are skipped in dev across the edit link ([id]/page.tsx), the reprocess route, the bill update route, and auth-guards.ts. Never enabled in production.
  • Dev sign-in now auto-creates and allows any signed-in account instead of denying unknown users.
  • Point the Civics Project API at https://api.civicsproject.org (was the Vercel preview URL).
  • Surface detailed error context (status, statusText, response body, URL) when a bill fetch to the Civics Project API fails, instead of a generic message.
  • Instruct the summary prompt to never mention tenets in the summary, questions, or rationale.

Notes

  • src/services/billApi.ts has a console.log({ URL }) debug line — left in for now; happy to drop it if undesired.

Test plan

  • type-check, biome check, and vitest all pass (29 tests).

🤖 Generated with Claude Code

- Add DEV_OPEN_ACCESS guard (NODE_ENV !== production) so admin/edit
  access is open locally; auth/allowlist checks are skipped in dev
  across the edit link, reprocess route, update route, and auth-guards.
- Dev sign-in now auto-creates and allows any account instead of denying.
- Point Civics Project API at https://api.civicsproject.org.
- Surface detailed error context (status, body, URL) when a bill fetch
  to the Civics Project API fails.
- Instruct the summary prompt to never mention tenets in output.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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