chore(ui,shared,localizations): Improve error handling when creating API keys#8056
chore(ui,shared,localizations): Improve error handling when creating API keys#8056wobsoriano wants to merge 6 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 1726683 The changes in this PR will be included in the next version bump. This PR includes changesets to release 21 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis pull request introduces API key error handling improvements, adds Chrome extension integration testing support, implements staging instance testing capabilities, reorganizes machine authentication tests, and performs widespread package version updates across the monorepo. Changes include new localization strings for API key conflicts and usage limits, updates to multiple frontend packages with bug fixes and feature improvements, enhancements to Clerk JS core functionality including session minting and token refresh behavior, updates to GitHub Actions workflows and Turbo configuration for CI/CD, and reorganization of integration tests to support both production and staging environments with new test fixtures and helpers. Possibly related PRs
|
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/ui/src/components/APIKeys/APIKeys.tsx`:
- Around line 123-126: The 403 branch in APIKeys.tsx currently maps all
forbidden responses to the "usage exceeded" message; update the handler in the
block that checks err.status === 403 to inspect the backend error code (e.g.,
err?.data?.code or err?.body?.code) and only call
card.setError(t(localizationKeys('unstable__errors.api_key_usage_exceeded')))
when that code equals "token_quota_exceeded"; for other 403s call a generic
forbidden message (or a fallback like t(localizationKeys('errors.forbidden')))
and ensure err is safely null-checked before reading the code to avoid runtime
errors.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro
Run ID: 0715d523-4e31-4d5b-8073-facaf725b8f5
📒 Files selected for processing (5)
.changeset/cyan-elephants-roll.mdintegration/tests/machine-auth/component.test.tspackages/localizations/src/en-US.tspackages/shared/src/types/localization.tspackages/ui/src/components/APIKeys/APIKeys.tsx
f192b79 to
517cbbe
Compare
Description
<APIKeys />componentChecklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
Summary by CodeRabbit
New Features
Bug Fixes
Documentation