Skip to content

"UNAUTHENTICATED" shown as the error text: actionErrorDetail reads a flat refusal body's bare error code before its message #37081

Description

@objectstack-fleet

triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

Filing gate: ① an experience defect with a named location and a measured reproduction, filed by triage at repo:objectstack#3's request (mailbox #36743, comment 7141386286). Source: fleet (out-of-scope finding 2 of the #36981 dev report 7141328651, PR #37077).

What happens

ui/packages/core/src/actions/actionErrorDetail.ts (actionErrorDetail, line 27) returns a bare-string error before message. The REST seam's flat 401 body is {error: 'UNAUTHENTICATED', code, message} (anonymous-deny.ts ANONYMOUS_DENY_BODY). Against that body, the user is shown the machine code instead of the sentence.

Measured on main: the Connector connections page printed 「Could not load connector connections. UNAUTHENTICATED」. PR #37077 stops those Setup surfaces from meeting the 401 while a bearer is held. Every other actionErrorDetail caller that reads a flat-family refusal still shows the code.

Expected

When the body carries a message, actionErrorDetail prefers it over a bare-string error code. A pin covers the flat 401 body.

Grading

area:ux · Bug · cosmetic: an error does not speak plainly (core feature ③) · any actionErrorDetail caller reading a flat refusal · measured once (Connector connections page) · p2 (the UX rule) · size S.

Business reason: a user whose action is refused reads 「UNAUTHENTICATED」 instead of a sentence telling them their session ended. They don't know to sign in again.

Reader: repo:objectstack#4 (new area:ux). One small PR in @object-ui/core with a pin.

Dedupe: actionErrorDetail and UNAUTHENTICATED user text (open and closed) returned 12 hits. #36981 is the source. The others are closed, or are about other refusals. No duplicate.

Activity

  1. added
    bug
    priority:p2
    pm:queue
    domain:ui
    on Nov 24, 2026
  2. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYmRepQK9DkZeU7F53D

    Claim: PM loop round 2 · area a4-U · 2026-11-24T20:31Z
    Session: session_01QSeKYmRepQK9DkZeU7F53D
    Account: os-justin
    Branch: claude/issue-37081-action-error-detail-message-first
    Worktree: objectstack-issue-37081
    Domain: domain:ui
    Seat: repo:objectstack#4
    Area: a4-U
    File surface: ui/packages/core/src/actions/actionErrorDetail.ts, a new test file named for this card (or a top-level describe in an existing harness for it), one patch changeset (stop on breach; explain in the report)
    Container & model: S, mode:subagent, model: default (dispatch-gates --tier at 293c005: no path-derived mandate), effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: the platform's own code (@object-ui/core actionErrorDetail, objectstack) | none — every caller resolves refusal text through this one helper | any user whose action meets a flat-family refusal body ({error: CODE, code, message}, e.g. the REST seam's 401 ANONYMOUS_DENY_BODY); measured once on the Connector connections page (triage filing)
    Thread-read: none
    Premise: holds — at origin/main 293c005 ui/packages/core/src/actions/actionErrorDetail.ts returns a bare-string error (~line 30) before it reads message (line 33), so {error: 'UNAUTHENTICATED', code, message} shows the code
    Serial constraints cleared: none — no open PR touches actionErrorDetail.ts (open PR file lists read now); source PR #37077 merged
    Pre-claim lane: ui/** — this seat's whole-repo lane; not an epic child (no parent; no epic body lists it)
    Pre-claim deps: no Blocked-by:
    Prior rulings read: card terms (actionErrorDetail, UNAUTHENTICATED, refusal message) → no ruling line; the helper's own docblock order ({error: 'msg'}, {error: {message}}, {message}) is the text this card amends. Repo: objectstack-ai/objectstack

  3. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 24, 2026
  4. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYmRepQK9DkZeU7F53D
    os-dev-report

    {
     "issue": 37081,
     "status": "done",
     "branch": "claude/issue-37081-action-error-detail-message-first",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/37138",
     "session": "session_01QSeKYmRepQK9DkZeU7F53D",
     "premise_still_valid": true,
     "summary": "Premise held on origin/main 293c0054: actionErrorDetail returned a bare-string error before reading message, so the flat 401 body ANONYMOUS_DENY_BODY ({error:'UNAUTHENTICATED', code, message} in packages/core/src/security/anonymous-deny.ts) showed the code. Now a non-empty string message beside a non-empty string error wins; {error:'sentence'} alone, the nested {error:{message}} envelope (kept ahead of a top-level message: no platform body found that needs otherwise), and the fallback are unchanged. Callers found (all unchanged, read through the one function): app-shell useConsoleActionRuntime.tsx, FlowItemMoreMenu.tsx, sharing-rule-catalog.ts, catalog-activation.ts, permission-set-clone.ts, packagedActionLedger.ts, connectorConnections.ts, connectorCredentials.ts, packagedFlowLedger.ts, flowResponse.ts; core actionResponse.ts. Pins flipped: none (no test asserted the code-over-message order). Card assignee not written; draft PR assignee os-justin from the claim's Account.",
     "tests": "At 39f1bca4. New ui/packages/core/src/actions/__tests__/actionErrorDetail-37081.test.ts (no existing actionErrorDetail harness): 5 passed. cd ui && vitest run packages/core/: Test Files 247 passed (247), Tests 4774 passed | 27 skipped, exit 0. vitest run over 113 test files naming a caller module or UNAUTHENTICATED (app-shell, console): Test Files 113 passed (113), Tests 1564 passed, exit 0. Static scan of every ui test for an object literal with both a string error and a string message: 8 hits, none routed through actionErrorDetail. turbo type-check --filter=@object-ui/core: @object-ui/core:type-check executed (cache miss), Tasks 4 successful, exit 0. Ablation (fix committed first, src resolved by relative import so no dist leg): ablation-replace --delete of the new return-b.message line, anchor 1->0, blob 03bc8286->7c90c74a; flat-401 pin red, Expected 'Authentication is required to access this endpoint.' Received 'UNAUTHENTICATED', 1 failed | 4 passed; restore blob == HEAD, git diff HEAD empty.",
     "gates": "dispatch-gates --commands at 39f1bca4 derived 38. 36 run lockless, each exit 0 (check-adr-0087-registration x2, check-changeset-no-major, check-closing-keyword-parity x2, check-comment-mask-corpus, check-empty-changeset x2, check-sdui-manifest x2, snapshot-next --self-test, check-governed-queue-guard --self-test, release-rehearsal-clone --self-test, release-pending-publish --self-test, spec check:duration-unit-keys, check:adr-anchors, check:changeset-gate-self-tests, check:closed-ceremony-text, check:cross-package-test-inputs, check:dispatcher-error-vocabulary, check:driver-memory-census, check:engine-double-contract, check:gitlink-declared, check:nul-bytes, check:published-files, check:query-options-erasure, check:refd-timer-probe, check:registry-log-declared, check:rest-log-spy-declared, check:skill-identifier-liveness, check:test-source-alias, check:tier-file-adoption, check:type-check-coverage, check:watch-hint-literal, check:where-matcher). pnpm --dir ui exec vitest run scripts/ after the seven-package Test UI build (build VERDICT command-exit 0, Tasks 42/42): Test Files 172 passed | 2 skipped, Tests 5131 passed, VERDICT command-exit 0. NOT MEASURED: check:type-check-debt, reason: first run exit 3 PREREQUISITE NOT MET (closure build got no lock turn), two locked retries exit 99 queue-timeout; CI runs it in Lint & Repo Gates. dispatch-gates --ran: 38 derived, 38 accounted (type-check-debt recorded as exit 99), exit 0. overlap-check: VERDICT clean exit 0 (twice, last vs origin/main 517e4153). PR check-runs: in_progress at report time, not awaited.",
     "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
     "mcp_calls": "0",
     "api_writes": "4 — git push x2 (empty branch probe, then the commit; not REST), relay pr_create (PR #37138, draft, assignee os-justin), post-stamped os-dev-report comment on #37081",
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [],
     "line_budget": "+78/-1 over 3 files (changeset 11, actionErrorDetail.ts +11/-1, test 56)",
     "files_changed": [
      ".changeset/37081-action-error-detail-message-first.md",
      "ui/packages/core/src/actions/__tests__/actionErrorDetail-37081.test.ts",
      "ui/packages/core/src/actions/actionErrorDetail.ts"
     ],
     "deviations": "Two git pushes against a one-push budget (empty-branch probe per os-dev rule 1, then the work). The pin copies ANONYMOUS_DENY_BODY literally because @object-ui/core does not depend on @objectstack/core. check:type-check-debt NOT MEASURED locally (declared narrowing, CI runs it)."
    }
  5. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYmRepQK9DkZeU7F53D

    Delivered · area a4-U · 2026-11-24T23:35Z · PR #37138 merged (L1 ACCEPT 7146722063)

    • actionErrorDetail now returns a refusal body's sentence (message) when a bare-string error code sits beside it, so the REST seam's flat 401 ({error: 'UNAUTHENTICATED', code, message}) shows the sentence, not the code, at every caller. {error: 'sentence'} alone, the nested envelope and the fallback are unchanged. Nothing remains on this card.
    • pm:dispatched removed with the close; domain:ui, area:ux stay.
  6. removed
    pm:dispatched
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:uxbugdomain:uipriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions