Skip to content

fix(sdk): the TypeScript SDK's network errors name their URL wherever Rust's do - #634

Merged
PiquelChips merged 2 commits into
mainfrom
fix/628-network-errors-name-url
Nov 21, 2026
Merged

PiquelChips merged 2 commits into
mainfrom
fix/628-network-errors-name-url

Conversation

@PiquelChips

@PiquelChips PiquelChips commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Two of the TypeScript SDK's network errors had no url: a document endpoint answering anything but 200, and a response body over 256 KiB. For example, Issuer.discover against a 500 rejected with error.url undefined. Every other transport failure in the TypeScript SDK names its URL, and so do the Rust SDK's NetworkError::Status and TooLarge.

Both errors now carry the URL. The url doc comment in error.ts now says exactly which errors have one. As in Rust, an error about a body's contents names its endpoint only in the message, and so does the error for signing keys not fetched recently.

The two new tests in http.test.ts are the issue's discovery reproduction and an oversized body. Both fail without the fix (url: undefined). In the published type declarations, only that doc comment changes; the types stay the same. No docs page mentions error.url.

Closes #628

Note

Written by Claude Opus 5.5 in Claude Code and reviewed by Claude Opus 5.5 (via T3 Code)

🤖 Generated with Claude Code

@PiquelChips
PiquelChips marked this pull request as draft November 20, 2026 09:59
@github-project-automation github-project-automation Bot moved this to Needs Triage in sourceorigin.dev Nov 20, 2026
@PiquelChips PiquelChips added bug Something isn't working sdk Rust and TypeScript SDKs labels Nov 20, 2026
@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 58 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d45bd324-bda8-4fe6-815f-b66ddfce4beb
Commits

Reviewing files that changed from the base of the PR and between f675d8d and 7158252.

Files selected for processing: 3

  • packages/auth/src/error.ts
  • packages/auth/src/http.ts
  • packages/auth/test/http.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@PiquelChips PiquelChips changed the title fix(sdk): every TypeScript network error names its URL fix(sdk): the TypeScript SDK's network errors name their URL wherever Rust's do Nov 20, 2026
@PiquelChips
PiquelChips marked this pull request as ready for review November 20, 2026 10:07
@PiquelChips
PiquelChips marked this pull request as draft November 21, 2026 14:01
A document endpoint answering other than 200, and a body over the limit,
threw network errors without url, unlike every other transport failure and
the Rust SDK's NetworkError::Status and TooLarge. Both now carry it.

Closes #628
@PiquelChips
PiquelChips force-pushed the fix/628-network-errors-name-url branch from 4d5c3b5 to 7158252 Compare November 21, 2026 14:08
@PiquelChips
PiquelChips marked this pull request as ready for review November 21, 2026 14:09
@PiquelChips
PiquelChips added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit 621a629 Nov 21, 2026
14 checks passed
@PiquelChips
PiquelChips deleted the fix/628-network-errors-name-url branch November 21, 2026 14:47
@github-project-automation github-project-automation Bot moved this from Needs Triage to Done in sourceorigin.dev Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working sdk Rust and TypeScript SDKs

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

fix(sdk): every TypeScript network error names its URL

1 participant