Skip to content

fix: URLs in error meta-messages#4564

Merged
jxom merged 1 commit into
wevm:mainfrom
jxom:strip-credentials-from-error-urls
Apr 30, 2026
Merged

fix: URLs in error meta-messages#4564
jxom merged 1 commit into
wevm:mainfrom
jxom:strip-credentials-from-error-urls

Conversation

@jxom
Copy link
Copy Markdown
Member

@jxom jxom commented Apr 30, 2026

No description provided.

Previously, errors raised by HttpRequestError, WebSocketRequestError,
RpcRequestError, and TimeoutError formatted the request URL verbatim
in their meta-messages — which leaked basic-auth credentials when an
RPC URL of the form 'https://user:pass@host' was used.

'getUrl' (the single chokepoint shared by every URL-bearing error
formatter in src/errors/request.ts) is now a sanitizer: it parses the
URL and clears 'username'/'password' before returning, falling back
to the raw input on parse failure.

Amp-Thread-ID: https://ampcode.com/threads/T-019de09d-2011-716e-a2cc-bf98f248520d
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 30, 2026

@jxom is attempting to deploy a commit to the Wevm Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 30, 2026

🦋 Changeset detected

Latest commit: cda1ba4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
viem Patch

Not sure what this means? Click here to learn what changesets are.

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

@jxom jxom changed the title fix: strip basic-auth credentials from URLs in error meta-messages fix: URLs in error meta-messages Apr 30, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 30, 2026

Open in StackBlitz

npm i https://pkg.pr.new/viem@4564

commit: cda1ba4

@jxom jxom merged commit d55c4a5 into wevm:main Apr 30, 2026
23 of 30 checks passed
This was referenced Apr 30, 2026
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.

1 participant