Skip to content

fix(playground): show the error CODE in the Pull lab, not just the message - #556

Open
IgorShevchik wants to merge 1 commit into
mainfrom
claude/pull-lab-show-error-code
Open

IgorShevchik wants to merge 1 commit into
mainfrom
claude/pull-lab-show-error-code

Conversation

@IgorShevchik

Copy link
Copy Markdown
Collaborator

Why

#555 gave Pull sends three distinct failures:

Code Means
JSSDK_PULL_PUBLIC_IDS_UNAVAILABLE Nobody to send to.
JSSDK_PULL_SEND_REFUSED The transport would not take the frame.
JSSDK_PULL_PUBLISHING_DISABLED The portal forbids client publishing.

The lab printed error.message — the SdkError description — and dropped the
code. That is the field a caller branches on, and two of the three read alike
without it. Verifying #555 on a portal was therefore harder than it needed to
be.

What changed

errorText() prefixes the code when the error carries one, so a failed check
reads [JSSDK_PULL_SEND_REFUSED] Pull: the connector refused the frame ….

Check 9 also now states what the expected outcome is in an application: a
fail carrying [JSSDK_PULL_PUBLIC_IDS_UNAVAILABLE], because
pull.channel.public.list is not in the application REST surface. Without that
line an honest result looks like a defect — and since until 3.0.0 the same
situation reported success and dropped the message in silence, seeing that
code is precisely the evidence that the fix is in the build being run. The
playground README says the same.

Testing

Playground only; nothing in packages/ changes. playground-nuxt:typecheck,
lint, lint:md clean; unit suite 92 files / 1152 tests green.

🤖 Generated with Claude Code

https://claude.ai/code/session_01F22e2ft66y7nuBJjzdThBr


Generated by Claude Code

…ssage

The lab reported `error.message`, which is the `SdkError` description. After
#555 there are three distinct ways a Pull send fails —
`JSSDK_PULL_PUBLIC_IDS_UNAVAILABLE` (nobody to send to),
`JSSDK_PULL_SEND_REFUSED` (the transport would not take the frame) and
`JSSDK_PULL_PUBLISHING_DISABLED` (the portal forbids it) — and the code is what
tells them apart and what a caller branches on. Two of the three read alike from
the message alone.

Check 9 now also says what the expected outcome IS in an application: a fail
carrying `[JSSDK_PULL_PUBLIC_IDS_UNAVAILABLE]`, because
`pull.channel.public.list` is not in the application REST surface. Without that
line the honest result looks like a defect, and — since until 3.0.0 the same
situation reported success and dropped the message in silence — seeing the code
is precisely the evidence that the fix is in the build being run.

Playground only.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F22e2ft66y7nuBJjzdThBr

This branch has not been deployed

No deployments
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.

2 participants