Skip to content

fix(localizations,shared): Localize the invalid and expired ticket errors - #9601

Merged
dmoerner merged 1 commit into
mainfrom
daniel/core-3727-localize-the-error-message-after-a-protect-block
Aug 28, 2026
Merged

fix(localizations,shared): Localize the invalid and expired ticket errors#9601
dmoerner merged 1 commit into
mainfrom
daniel/core-3727-localize-the-error-message-after-a-protect-block

Conversation

@dmoerner

Copy link
Copy Markdown
Contributor

Description

The ticket_invalid_code and ticket_expired_code API errors had no unstable__errors key, so translateError fell through to the backend longMessage and showed end users "This ticket is invalid. Make sure you're using a valid ticket generated by Clerk." Both "ticket" and "Clerk" are implementation details to someone who just clicked their IdP tile or an invitation link.

Add both keys to UnstableErrors and give them end-user copy in en-US, then propagate the keys to the remaining locales via pnpm generate.

Use copy that is sufficiently general to cover both SAML and invitation paths:

ticket_expired_code: 'This link has expired. Please start again or request a new link.',
ticket_invalid_code: 'This link is no longer valid or has already been used. Please start again or request a new link.',

Fixes CORE-3727.

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

…ink errors

The `ticket_invalid_code` and `ticket_expired_code` API errors had no
`unstable__errors` key, so `translateError` fell through to the backend
`longMessage` and showed end users "This ticket is invalid. Make sure
you're using a valid ticket generated by Clerk." Both "ticket" and
"Clerk" are implementation details to someone who just clicked their
IdP tile or an invitation link.

Add both keys to `UnstableErrors` and give them end-user copy in en-US,
then propagate the keys to the remaining locales via `pnpm generate`.

Use copy that is sufficiently general to cover both SAML and invitation
paths:

```
ticket_expired_code: 'This link has expired. Please start again or request a new link.',
ticket_invalid_code: 'This link is no longer valid or has already been used. Please start again or request a new link.',
```

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview Aug 28, 2026 1:29pm
swingset Ready Ready Preview Aug 28, 2026 1:29pm

Request Review

@changeset-bot

changeset-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9c01003

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 23 packages
Name Type
@clerk/localizations Patch
@clerk/shared Patch
@clerk/react Patch
@clerk/ui Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/chrome-extension Patch
@clerk/clerk-js Patch
@clerk/electron Patch
@clerk/expo-passkeys Patch
@clerk/expo Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/headless Patch
@clerk/hono Patch
@clerk/msw Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/tanstack-react-start Patch
@clerk/testing Patch
@clerk/vue Patch
@clerk/swingset Patch

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

@pkg-pr-new

pkg-pr-new Bot commented Aug 28, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@9601

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@9601

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@9601

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@9601

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@9601

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@9601

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@9601

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@9601

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@9601

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@9601

@clerk/express

npm i https://pkg.pr.new/@clerk/express@9601

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@9601

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@9601

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@9601

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@9601

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@9601

@clerk/react

npm i https://pkg.pr.new/@clerk/react@9601

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@9601

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@9601

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@9601

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@9601

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@9601

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@9601

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@9601

commit: 9c01003

@github-actions

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-08-28T13:31:21.564Z

Summary

Metric Count
Packages analyzed 19
Packages with changes 0
🔴 Breaking changes 0
🟡 Non-breaking changes 0
🟢 Additions 0

No API Changes Detected

All packages have stable APIs with no detected changes.


Report generated by Break Check

Last ran on 9c01003.

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 5e419716-7e5e-4bdf-aa56-9bb2bc4b3e02

📥 Commits

Reviewing files that changed from the base of the PR and between dc7fab3 and 9c01003.

📒 Files selected for processing (51)
  • .changeset/tidy-moons-listen.md
  • packages/localizations/src/ar-SA.ts
  • packages/localizations/src/be-BY.ts
  • packages/localizations/src/bg-BG.ts
  • packages/localizations/src/bn-IN.ts
  • packages/localizations/src/ca-ES.ts
  • packages/localizations/src/cs-CZ.ts
  • packages/localizations/src/da-DK.ts
  • packages/localizations/src/de-DE.ts
  • packages/localizations/src/el-GR.ts
  • packages/localizations/src/en-GB.ts
  • packages/localizations/src/en-US.ts
  • packages/localizations/src/es-CR.ts
  • packages/localizations/src/es-ES.ts
  • packages/localizations/src/es-MX.ts
  • packages/localizations/src/es-UY.ts
  • packages/localizations/src/fa-IR.ts
  • packages/localizations/src/fi-FI.ts
  • packages/localizations/src/fr-FR.ts
  • packages/localizations/src/he-IL.ts
  • packages/localizations/src/hi-IN.ts
  • packages/localizations/src/hr-HR.ts
  • packages/localizations/src/hu-HU.ts
  • packages/localizations/src/id-ID.ts
  • packages/localizations/src/is-IS.ts
  • packages/localizations/src/it-IT.ts
  • packages/localizations/src/ja-JP.ts
  • packages/localizations/src/kk-KZ.ts
  • packages/localizations/src/ko-KR.ts
  • packages/localizations/src/mn-MN.ts
  • packages/localizations/src/ms-MY.ts
  • packages/localizations/src/nb-NO.ts
  • packages/localizations/src/nl-BE.ts
  • packages/localizations/src/nl-NL.ts
  • packages/localizations/src/pl-PL.ts
  • packages/localizations/src/pt-BR.ts
  • packages/localizations/src/pt-PT.ts
  • packages/localizations/src/ro-RO.ts
  • packages/localizations/src/ru-RU.ts
  • packages/localizations/src/sk-SK.ts
  • packages/localizations/src/sr-RS.ts
  • packages/localizations/src/sv-SE.ts
  • packages/localizations/src/ta-IN.ts
  • packages/localizations/src/te-IN.ts
  • packages/localizations/src/th-TH.ts
  • packages/localizations/src/tr-TR.ts
  • packages/localizations/src/uk-UA.ts
  • packages/localizations/src/vi-VN.ts
  • packages/localizations/src/zh-CN.ts
  • packages/localizations/src/zh-TW.ts
  • packages/shared/src/types/localization.ts
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • clerk/clerk_go (manual)
  • clerk/dashboard (manual)
  • clerk/accounts (manual)
  • clerk/backoffice (manual)
  • clerk/clerk (manual)
  • clerk/clerk-docs (manual)
  • clerk/cloudflare-workers (manual)
  • clerk/cli (auto-detected)
  • clerk/clerk-ios (auto-detected)
  • clerk/clerk-android (auto-detected)

Included review availability: 6 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 8 reviews per hour.


📝 Walkthrough

Walkthrough

Adds ticket_expired_code and ticket_invalid_code to the unstable localization error contract. Adds English US messages and undefined placeholders to the other locale resources. Adds patch release notes for @clerk/localizations and @clerk/shared.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 9c010

This change provides end-user messages for invalid and expired links across supported locales. No actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: dstaley, laurabeatris

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: localizing invalid and expired ticket errors.
Description check ✅ Passed The description directly explains the localization changes, user-facing messages, affected locales, and the reason for preventing backend message fallback.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 4…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 45 files. (6 skipped: 1 unsupported, 5 too large.)


Comment @coderabbitai help to get the list of available commands.

@wobsoriano wobsoriano left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏

@dmoerner
dmoerner merged commit 0d224f2 into main Aug 28, 2026
144 of 150 checks passed
@dmoerner
dmoerner deleted the daniel/core-3727-localize-the-error-message-after-a-protect-block branch August 28, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants