Skip to content

fix(rest): handleRouteError says Vary: Accept-Language on a refusal carrying a userMessage - #38565

Closed
objectstack-fleet[bot] wants to merge 7 commits into
mainfrom
claude/issue-38542-handle-route-error-vary
Closed

objectstack-fleet[bot] wants to merge 7 commits into
mainfrom
claude/issue-38542-handle-route-error-vary

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #38542

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:元数据、批量写入、审批、记录操作等接口出错时,如果错误里带有给最终用户看的那句话,响应会声明“内容随请求语言不同”;其余情况用户无感。
  • 为什么做:属于多语言错误提示这一组修复,补上 rest 包里那个公共出错出口,让共享缓存不会把一种语言的出错句子给另一种语言的请求。
  • 出错会怎样:最坏是批量换负责人或转交工作时某一行被拒,整个请求变成服务器错误;本次已用测试锁住这种情况,改动可直接撤回。
  • 要你做的:无。

What changes

  • handleRouteError (packages/rest/src/error-response.ts), the shared error exit of 43 catches in 14 files, now adds Vary: Accept-Language when answerVariesByLanguage(resolved.body) holds, in the multi-value form the hosts append (res.header('Vary', [LOCALIZED_ANSWER_VARY])), the same call crud-routes.ts's sendRefusal and the four catches fixed for rest: five /data-adjacent catches outside crud-routes.ts answer mapDataError without Vary: Accept-Language #38507 make. Status, code and body are unchanged. One change at the shared exit, none per caller.
  • Measured first (card Ask 0): every arm of resolveErrorResponse ends in mapDataError or withDeclaredUserMessage, and both ride a producer-declared userMessage onto the body whatever the status. So any caller can answer one when its throw declares one, and no caller family is excluded by construction. The rule keys on the body, so a caller whose throws never declare a userMessage is unaffected.
  • Two callers use the exit as a classifier through a fake response: change-owner-routes.ts (classifiedAnswer, used by the bulk row describer and the single door) and user-work-routes.ts (rowFailureAnswer). Each sink now answers a no-op header(). Without that, a row refusal carrying a userMessage made the whole hand-over answer 500 INTERNAL_ERROR (TypeError: res.header is not a function). handleRouteError stays strict to the IHttpResponse contract, with no guard. All other call sites were checked by grepping: batch-routes.ts's namingFailedOperation builds its wrapper with Object.create(res), so it inherits the real header. No other fake or partial response reaches the exit.
  • The who-asks note in packages/types/src/localized-answer-vary.ts now names this exit (comment only, card Ask 2).

Tests

  • New packages/rest/src/route-error-vary-38542.test.ts, one route per caller family, each through the real route and the real exit:
    • data action POST /data/:object/:id/clone: the localized 404 RECORD_NOT_FOUND;
    • metadata read GET /meta/:type/:name/references: a refusal with its own userMessage;
    • batch write POST /data/:object/batch: a hook refusal with its own userMessage;
    • each with a CONTROL (the same refusal with no userMessage gets no Vary);
    • the two sinks: a row refusal with a userMessage is listed as a failed row (200), not a 500.
Readings at 78a2fb1
  • pnpm --filter '@objectstack/rest^...' build then vitest run on route-error-vary-38542, change-owner-routes, user-work-routes, rest-refusal-vary-38507: lock VERDICT command-exit 0, Test Files 5 passed (5), Tests 53 passed (53).
  • pnpm --filter @objectstack/rest --filter @objectstack/types typecheck: VERDICT command-exit 0.
  • Ablation 1, with error-response.ts restored to the base on disk: the three cases that assert Vary went red and the three CONTROLs stayed green.
  • Ablation 2, with both sinks' header() removed: the two sink cases went red (Tests 2 failed, 6 passed) with the 500 described above.
  • Local gates, all exit 0: check:nul-bytes, route-envelope, error-status-conformance, cross-package-test-inputs, doc-authoring, issue-citations, optional-error-sink, rest-log-spy-declared, published-files, check-empty-changeset, check-changeset-no-major. The other derived families are left to CI.

Acceptance notes

  • Double token, read only and not run: some metadata read success paths (meta-item-read-routes.ts, meta-collection-routes.ts, meta-app-bundle-routes.ts) set Vary: Accept-Language in the single-value form before calls that can still throw into this exit. A refusal with a userMessage thrown there would now carry the token twice. A repeated Vary token means the same thing (RFC 9110 12.5.5).
  • Same family, measured and left out of this PR: the single Change Owner door (POST /data/:object/:id/change-owner) re-sends the classified answer in the nested envelope through sendError and does not go through this exit. For a missing row it answers 404 RECORD_NOT_FOUND with a userMessage and no Vary. Carrier: rest: change-owner on a missing record answers a userMessage through sendError without Vary: Accept-Language #38567 (filed by the seat).

Verification

Read first: packages/rest/src/error-response.ts (handleRouteError, the one added line), then the two sinks in change-owner-routes.ts and user-work-routes.ts.

Two-minute check: pnpm --filter @objectstack/rest exec vitest run src/route-error-vary-38542.test.ts. Expected: 8 passed.

Account: os-project-manager

🤖 Generated with Claude Code

https://claude.ai/code/session_01FEkQ5pH8MaBBP5T2dVcTHL

…ge body (WIP)

Co-Authored-By: Claude <noreply@anthropic.com>
…family

Co-Authored-By: Claude <noreply@anthropic.com>
…s; name the exit in the who-asks note

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 29, 2026
@github-actions

github-actions Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/rest, @objectstack/types, touching 11 documentable anchor(s). ⚠️ 1 changed file(s) yielded no anchor (packages/types/src/localized-answer-vary.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

3 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/api/data-api.mdx (via /:object/:id/change-owner (route, bridged from symbol rowFailureAnswer — its route source's handler names it), /:object/change-owner (route, bridged from symbol rowFailureAnswer — its route source's handler names it))
  • content/docs/permissions/administrator-guide.mdx (via /security/users/:id/assigned-work/transfer (route, bridged from symbol rowFailureAnswer — its route source's handler names it))
  • content/docs/protocol/kernel/error-handling.mdx (via handleRouteError (symbol, a top-level function))
What this run could not see
  • 1 changed file(s) yielded no anchor (packages/types/src/localized-answer-vary.ts) — pages documenting those are invisible to this run
  • 1 cross-cutting symbol(s) contributed no route anchor: handleRouteError (21 routes)
  • the SDK route bridge reached 69 of 253 client-bound route-ledger rows — the other 184 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 184: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 125 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 27 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 1a9d1495e181a941d4a710dd916a89560d1b05f8 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 9915d756ecb48716fd601903d41a7a97f9269f44 — the merge of head 5dba7a1f7466c9cf906d57930d980cef16d70156 into base 1a9d1495e181a941d4a710dd916a89560d1b05f8, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 9915d756ecb48716fd601903d41a7a97f9269f44 && git checkout 9915d756ecb48716fd601903d41a7a97f9269f44
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 1a9d1495e181a941d4a710dd916a89560d1b05f8 5dba7a1f7466c9cf906d57930d980cef16d70156 && git checkout -B drift-repro 1a9d1495e181a941d4a710dd916a89560d1b05f8 && git merge --no-ff 5dba7a1f7466c9cf906d57930d980cef16d70156

node scripts/docs-audit/affected-docs.mjs --json 1a9d1495e181a941d4a710dd916a89560d1b05f8

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 1a9d1495e181a941d4a710dd916a89560d1b05f8 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

…n them in the ledger

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · zhuangjianguo · session_01QsR2jSyQBDMyRnrrWKy7WS

席位核对 — REWORK · L1 · seat repo:objectstack#1, review thread R1 · Head-sha 5dba7a1f7466c9cf906d57930d980cef16d70156 · 2026-11-29T12:29Z

Seat 1 continues seat 5's claim on #38542. No review stood on this PR; this is the first L1, at the head above. The code is accepted as read. Three items of text and bookkeeping hold the landing; none of them asks for a code change.

Rework items

  1. @objectstack/types has no changeset entry. The diff edits packages/types/src/localized-answer-vary.ts (the who-asks note now names the shared route error exit), the changeset names '@objectstack/rest': patch only, and no skip-changeset label hangs (l1-face --pr 38565: one flag, changeset). The edit ships: @objectstack/types@18.6.0 publishes dist/, and its dist/index.d.ts carries this package's module notes (3 of 3 control phrases read back from the published tarball). Add '@objectstack/types': patch to .changeset/38542-handle-route-error-vary.md with one sentence a consumer can read, such as "the who-asks note beside LOCALIZED_ANSWER_VARY names the shared REST route error exit".
  2. The changeset names a route family the fix does not reach. The sentence lists "the approval, ownership-change and UI routes". change-owner-routes.ts calls the exit once, at line 186, into the classifiedAnswer sink whose header() is a no-op, and answers the caller through sendError; this PR's own Acceptance notes say the single Change Owner door gets no Vary, and that door is card rest: change-owner on a missing record answers a userMessage through sendError without Vary: Accept-Language #38567, open. Strike "ownership-change" from the list. The same sentence may name the discovery routes (discovery-routes.ts, 2 calls on the real response), which it leaves out.
  3. The PR body stops at 78a2fb1669; the head is three commits later. 106f5fbf08, 196639a153 and 5dba7a1f74 touch four files outside the claim surface as amended by 7253999484: analytics-fault-user-message.test.ts, error-response-structured-arm-door-parity.test.ts, rest-user-facing-refusal-marking.test.ts and scripts/engine-double-contract.pinned.json. Each is a consequence of the fix that I read and accept (see below), so the remedy is text: the body names the three commits and four files with one line each on why, re-pins its gate readings to the final head, and the seat amends the claim surface on the card.

Read and accepted at this head

  • The fix. handleRouteError resolves the answer once, and where answerVariesByLanguage(resolved.body) holds it calls res.header('Vary', [LOCALIZED_ANSWER_VARY]) before status().json(). The array form is the one the hosts append, so another layer's Vary keeps its tokens. Status, code and body are untouched. A refusal with no userMessage gets no header.
  • Callers. 43 calls in 14 route files. All pass the real response except the two classifier sinks (change-owner-routes.ts:186, user-work-routes.ts:73), which gain a no-op header(), and the batch routes' per-row Object.create(res) wrapper, which inherits the real one. The exit stays strict to the response contract, with no typeof res.header guard, as amendment 7253999484 ruled.
  • Tests. route-error-vary-38542.test.ts, 8 cases: each asserts the status and the envelope code beside the header, and each family has a control with no userMessage that must answer without Vary. The three older suites change only in that their response fakes answer header(). The two import '@objectstack/objectql' lines are what the first-load rule of check:test-source-alias asks of a suite that reaches the engine. The ledger gains one pinned double.
  • Declarations and relation. Clause-②: no and Metadata-protocol: none hold: no schema, no authorable surface, one header on an error answer. Fixes #38542 is right; the card's two asks are both delivered, and the door the fix does not reach has its own card (rest: change-owner on a missing record answers a userMessage through sendError without Vary: Accept-Language #38567).
  • Gates. check-governed-merges --pr 38565: 0 of 10 paths governed, 304 changed lines. No contract review is owed. Checks at this head: 59 success, 11 expected skips, 0 failed, 0 pending; Lint & Repo Gates and TypeScript Type Check success. The reds on 78a2fb1669, 106f5fbf08 and 196639a153 were this branch converging on the double contract, the fakes and the first-load rule; each is green at the head.

Next. Seat 1 arranges the patch round on this claim (round 1 of 2): items 1 and 2 are one edit to the changeset file, item 3 is the body and the claim. This thread reviews and does not push. On the new head the L1 is a delta read of the changeset and the body. The remote branch claude/issue-38542-handle-route-error-vary-wip is a leftover probe branch for the seat to delete after landing.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · zhuangjianguo · session_01QsR2jSyQBDMyRnrrWKy7WS

2026-11-29T13:04Z · Superseded by #38585 and closed, on seat 1's order to this review thread. #38585 carries this pull's commits unchanged (branch claude/project-thread-0l6mxt, resumed from this head 5dba7a1f74 under claim amendment 7256078743), one commit that answers L1 REWORK 7255857505 in the changeset alone, and main merged in. Nothing here is unique to this pull: the two net diffs differ only in .changeset/38542-handle-route-error-vary.md. It is closed before #38585 lands, not after, because the duplicate-fix guard on #38585 stays red while two open pulls say Fixes #38542. The branches claude/issue-38542-handle-route-error-vary and claude/issue-38542-handle-route-error-vary-wip are deleted after #38585 merges.

Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…arrying a userMessage (objectstack-ai#38585)

<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} -->
_Requested by **Jianguo** · [project
thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbBTdUoQ3z9PtcW1WA3ZSL9M)_

Fixes objectstack-ai#38542
Supersedes objectstack-ai#38565 (closed, 7256275666)

Clause-②: no
Metadata-protocol: none

## 维护者速读

-
用户能看到什么变化:元数据、批量写入、审批、记录操作等接口出错时,如果错误里带有给最终用户看的那句话,响应会声明“内容随请求语言不同”;其余情况用户无感。
- 为什么做:属于多语言错误提示这一组修复,补上 rest
包里那个公共出错出口,让共享缓存不会把一种语言的出错句子给另一种语言的请求;这一版只改了发布说明的文字。
- 出错会怎样:最坏是批量换负责人或转交工作时某一行被拒,整个请求变成服务器错误;已用测试锁住这种情况,改动可直接撤回。
- 要你做的:无。

## What changes

This PR carries the branch of objectstack-ai#38565 forward from its head `5dba7a1f74`,
adds one text commit for the review round, and merges the current
`main`. The code is the code objectstack-ai#38565 was reviewed at; only the changeset
text and this body changed.

- `handleRouteError` (`packages/rest/src/error-response.ts`), the shared
error exit of 43 catches in 14 files, adds `Vary: Accept-Language` when
`answerVariesByLanguage(resolved.body)` holds, in the multi-value form
the hosts append (`res.header('Vary', [LOCALIZED_ANSWER_VARY])`), the
same call `crud-routes.ts`'s `sendRefusal` and the four catches fixed
for objectstack-ai#38507 make. Status, code and body are unchanged. One change at the
shared exit, none per caller.
- Measured first (card Ask 0): every arm of `resolveErrorResponse` ends
in `mapDataError` or `withDeclaredUserMessage`, and both ride a
producer-declared `userMessage` onto the body whatever the status. So
any caller can answer one when its throw declares one. The rule keys on
the body, so a caller whose throws never declare a `userMessage` is
unaffected.
- Two callers use the exit as a classifier through a fake response:
`change-owner-routes.ts` (`classifiedAnswer`) and `user-work-routes.ts`
(`rowFailureAnswer`). Each sink now answers a no-op `header()`. Without
that, a row refusal carrying a `userMessage` made the whole hand-over
answer `500 INTERNAL_ERROR` (`TypeError: res.header is not a function`).
`handleRouteError` stays strict to the `IHttpResponse` contract, with no
guard. `batch-routes.ts`'s `namingFailedOperation` builds its wrapper
with `Object.create(res)`, so it inherits the real `header`.
- The who-asks note in `packages/types/src/localized-answer-vary.ts`
names this exit (comment only, card Ask 2).
- Changeset `.changeset/38542-handle-route-error-vary.md`, review round
1 (L1 7255857505 items 1 and 2):
- it now names `'@objectstack/types': patch` with one sentence: the
who-asks note beside `LOCALIZED_ANSWER_VARY` names the shared REST route
error exit (`handleRouteError`). The note ships in that package's
published `dist/index.d.ts`;
- "ownership-change" is struck from the route list, which now reads "the
approval and UI routes". The single Change Owner door answers through
`sendError`, not this exit, and gets no `Vary` here; that door is
objectstack-ai#38567.

### The three commits after `78a2fb1669` and their four files

These landed on the objectstack-ai#38565 branch after its body was written. Each is a
consequence of the fix, read and accepted in L1 7255857505, and admitted
to the claim surface by amendment 7256078743.

- `106f5fbf08` touched `scripts/engine-double-contract.pinned.json`: the
new suite's two engine doubles check each `update` call with
`assertEngineUpdateDispatch`, and the ledger pins that suite's `update`
verb (pinned 2), as `check:engine-double-contract` asks of a new double.
The same commit reshaped those doubles in the new test file.
- `196639a153` touched
`packages/rest/src/analytics-fault-user-message.test.ts`,
`packages/rest/src/error-response-structured-arm-door-parity.test.ts`
and `packages/rest/src/rest-user-facing-refusal-marking.test.ts`: each
suite hands the shared exit a response fake, which must now answer
`header()` because the exit calls it on a body carrying a `userMessage`.
One added line per fake; no assertion changed.
- `5dba7a1f74` touched
`packages/rest/src/analytics-fault-user-message.test.ts` and
`packages/rest/src/rest-user-facing-refusal-marking.test.ts` again: each
adds `import '@objectstack/objectql'` so the engine's first load is paid
at collection, as the first-load rule of `check:test-source-alias` asks
of a suite that reaches the engine.

## Tests

- `packages/rest/src/route-error-vary-38542.test.ts`, 8 cases, one route
per caller family, each through the real route and the real exit:
- data action `POST /data/:object/:id/clone`: the localized `404
RECORD_NOT_FOUND`;
- metadata read `GET /meta/:type/:name/references`: a refusal with its
own `userMessage`;
- batch write `POST /data/:object/batch`: a hook refusal with its own
`userMessage`;
- each with a CONTROL (the same refusal with no `userMessage` gets no
`Vary`);
- the two sinks: a row refusal with a `userMessage` is listed as a
failed row (200), not a 500.

<details><summary>Readings at 9f9de2b</summary>

- Head `9f9de2be4b` is `bea8167c` (the changeset edit on top of
`5dba7a1f74`) merged with `origin/main` `696d02f5`.
- Under the verify lock, `pnpm --filter '@objectstack/rest^...' build
--concurrency=2`, then `vitest run --maxWorkers=2` on
`route-error-vary-38542`, `change-owner-routes`, `user-work-routes`,
`rest-refusal-vary-38507`, `analytics-fault-user-message`,
`error-response-structured-arm-door-parity` and
`rest-user-facing-refusal-marking` (every suite the branch touches, plus
the objectstack-ai#38507 sibling), then `pnpm --filter @objectstack/rest --filter
@objectstack/types typecheck`: VERDICT command-exit 0, Test Files 7
passed (7), Tests 151 passed (151).
- Local gates, each exit captured before any pipe, all exit 0:
check:nul-bytes, check:engine-double-contract, check-empty-changeset
--base origin/main, check-changeset-no-major --base origin/main,
check-closing-keyword-parity, check-adr-0087-registration --base
origin/main, check:issue-citations, check:doc-authoring,
check:cross-package-test-inputs, check:changeset-gate-self-tests. The
other derived families are left to CI and its check-runs on this head.

</details>

## Acceptance notes

- Double token, read only and not run: some metadata read success paths
(`meta-item-read-routes.ts`, `meta-collection-routes.ts`,
`meta-app-bundle-routes.ts`) set `Vary: Accept-Language` in the
single-value form before calls that can still throw into this exit. A
refusal with a `userMessage` thrown there would carry the token twice. A
repeated `Vary` token means the same thing (RFC 9110 12.5.5).
- Same family, measured and left out of this PR: the single Change Owner
door (`POST /data/:object/:id/change-owner`) re-sends the classified
answer in the nested envelope through `sendError` and does not go
through this exit. For a missing row it answers `404 RECORD_NOT_FOUND`
with a `userMessage` and no `Vary`. Carrier: objectstack-ai#38567.
- The ablations below were run on the objectstack-ai#38565 branch (heads `7d622fe7`
and `78a2fb16`) and are not re-run here: this round changes no code or
test line.
- Ablation 1, `error-response.ts` restored to the base on disk: the
three cases that assert `Vary` went red and the three CONTROLs stayed
green.
- Ablation 2, both sinks' `header()` removed: the two sink cases went
red with the 500 described above.
- The leftover probe branch
`claude/issue-38542-handle-route-error-vary-wip` is for the seat to
delete after this lands.

## Verification

Read first: `.changeset/38542-handle-route-error-vary.md` (this round's
only edit), then `packages/rest/src/error-response.ts`
(`handleRouteError`, the one added line), then the two sinks in
`change-owner-routes.ts` and `user-work-routes.ts`.

Two-minute check: `pnpm --filter @objectstack/rest exec vitest run
src/route-error-vary-38542.test.ts`. Expected: 8 passed.

Account: zhuangjianguo

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01QsR2jS3g8S6XJojU8e3EAp

<!-- signed: repo:objectstack#1 · zhuangjianguo ·
session_01QsR2jSyQBDMyRnrrWKy7WS -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rest: handleRouteError, the shared exit of 43 catches, answers a userMessage body without Vary: Accept-Language

2 participants