Skip to content

docs: fix onRequestError error type example#94518

Merged
icyJoseph merged 2 commits into
vercel:canaryfrom
danyalahmed1995:docs/on-request-error-unknown
Jun 8, 2026
Merged

docs: fix onRequestError error type example#94518
icyJoseph merged 2 commits into
vercel:canaryfrom
danyalahmed1995:docs/on-request-error-unknown

Conversation

@danyalahmed1995

Copy link
Copy Markdown
Contributor

Fixes #94499

Summary

The Instrumentation.onRequestError type currently exposes the error parameter as unknown, but the docs described it as Error & { digest: string } and the example accessed err.message directly.

This updates the docs/example to match the current type and narrows the caught value before reading message.

Tests:

  • git diff --check

@icyJoseph icyJoseph self-requested a review June 8, 2026 21:28
@icyJoseph

Copy link
Copy Markdown
Member

Nice, once again thanks. We require signed commits. Do you mind rewriting the commits on this branch so that they are signed?

@danyalahmed1995

Copy link
Copy Markdown
Contributor Author

Oh sure

@danyalahmed1995 danyalahmed1995 force-pushed the docs/on-request-error-unknown branch from 30ccd11 to ee6bb8b Compare June 8, 2026 21:47
@danyalahmed1995

Copy link
Copy Markdown
Contributor Author

Done, I rewrote the branch with signed commits.

@danyalahmed1995 danyalahmed1995 force-pushed the docs/on-request-error-unknown branch from ee6bb8b to e2264c8 Compare June 8, 2026 21:53
@icyJoseph icyJoseph enabled auto-merge (squash) June 8, 2026 22:27
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Stats skipped

Commit: e2264c8
View workflow run

@icyJoseph icyJoseph merged commit 5c9bc5c into vercel:canary Jun 8, 2026
58 checks passed
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Tests Passed

Commit: e2264c8

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.

Instrumentation.onRequestError error parameter type does not match the docs

2 participants