Skip to content

docs: show unwrap() with throwOnError true and false - #198

Merged
stijnvanhulle merged 1 commit into
mainfrom
claude/promise-unwrap-method-j8fzrb
Sep 2, 2026
Merged

docs: show unwrap() with throwOnError true and false#198
stijnvanhulle merged 1 commit into
mainfrom
claude/promise-unwrap-method-j8fzrb

Conversation

@stijnvanhulle

Copy link
Copy Markdown
Contributor

🎯 Changes

The "Unwrap the success body" section only showed the default throwOnError: true case. It never showed what unwrap() does with throwOnError: false, so it's now split into two examples:

  • Default throwOnError: true: unwrap() throws the same ResponseError a plain await would.
  • throwOnError: false: the call resolves instead, so unwrap() rejects on its own, throwing the bare parsed error body, not a ResponseError.

Error handling also gets a one-line cross-reference back to this section.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I am using USA English (serialize, color, center, canceled, analyze, license).
  • I ran the humanizer check on any new documentation I wrote.

🤖 Generated with Claude Code

https://claude.ai/code/session_016J52n2bJ25eu2G7eXm7gAL


Generated by Claude Code

… and false

Adds examples of how unwrap() throws differently for the two settings: a
ResponseError by default, the bare error body with throwOnError: false.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016J52n2bJ25eu2G7eXm7gAL
@coldtea-pr-lens

coldtea-pr-lens Bot commented Sep 2, 2026

Copy link
Copy Markdown

◈ PR Lens

🟢 +0 new · 🟠 ~1 changed · 🔴 -0 removed · 0 flows · 2 files · commit dfc5e26


Architecture

Architecture diagram for kubb-labs/docs at dfc5e26

1 component touched across 1 lane.

Open full size


Data flow

No data-flow sequence changed in this PR.


Drill down
Extensions & Snippets — 1 component
🟡 CHANGED Shared How-To Snippets

Shared Markdown snippets transcluded into plugin guides, updated with .unwrap() error behavior for throwOnError configurations.


View

  • Architecture lens
  • Data flow lens
  • Expand every detail
  • Show unchanged neighbours

Tip

Push a new commit and the whole comment re-renders for the new head. An older run never overwrites a newer one, so a slow render cannot put a stale diagram back.

🪧 More tips
  • Run PR Lens on your own machine: npx skills add coldteadotai/pr-lens installs the agent skill. Then tell your coding agent: "Diagram the change you just made with PR Lens and attach it to the pull request."
  • Draw a diff before it is even a pull request: npx @coldtea/pr-lens-cli analyze --base origin/main reads the diff with your own model key, and npx @coldtea/pr-lens-cli render .pr-lens/graph.json draws the same lenses on your machine.
  • The boxes under View are live. Tick Architecture lens or Data flow lens to choose which diagrams appear, or Expand every detail to open every drill-down at once. The comment redraws in place a few seconds later.
  • Show unchanged neighbours lists the components this change did not touch alongside the ones it did, so the drill-down shows what the changed code sits next to.
  • GitHub will not let you zoom an image in a comment. The link under each diagram opens it full size on a page of its own, where you can.
  • The CLI's render picks up .github/pr-lens.yml automatically and applies your corrections (renames, exclusions, lane pins) at draw time.
  • Would you rather run it from CI on a key of your own? Add .github/workflows/pr-lens.yml with coldteadotai/pr-lens/packages/action@v0 and a model key in your repository secrets, say GEMINI_API_KEY. The Action asks Gemini by default, or OpenAI and any endpoint speaking /chat/completions through its provider input.
  • PR Lens is free for open source. A star on the repository is what keeps it going.
  • The diagrams follow your GitHub theme, so dark mode gets the dark render and light mode the light one, and the moving dots show this pull request's data in motion.

◈ Rendered by PR Lens · crafted with ❤️ by the Coldtea team · Something drawn wrong?

@changeset-bot

changeset-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: dfc5e26

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 7b760686-3a9f-4673-8e48-0aad77af8c85

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@stijnvanhulle
stijnvanhulle merged commit 24e73bd into main Sep 2, 2026
3 checks passed
@stijnvanhulle
stijnvanhulle deleted the claude/promise-unwrap-method-j8fzrb branch September 2, 2026 19:20
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