Skip to content

fix(onchain): surface RPC fetch failures instead of silently returning empty - #1

Closed
0xblckmrq wants to merge 1 commit into
mainfrom
maylynne/fix-onchain-rpc-silent-fail
Closed

0xblckmrq wants to merge 1 commit into
mainfrom
maylynne/fix-onchain-rpc-silent-fail

Conversation

@0xblckmrq

Copy link
Copy Markdown

Summary

  • getAttestationData was swallowing all RPC errors and returning undefined, making it impossible to distinguish a genuine empty attestation from a fetch failure
  • onChainContext then silently reset activeChainProviders to [] — no error state, no retry affordance
  • ~4k Datadog events/week, ~297 distinct sessions affected (WalletConnect relay + Alchemy RPC errors)
  • Fixes holonym-foundation/internal-docs#2543

Changes

File Change
app/utils/onChainStamps.ts getAttestationData re-throws after logging — return type narrows from AttestationData | undefined to AttestationData
app/context/onChainContext.tsx Per-chain try/catch around getAttestationData; sets onChainFetchFailed=true when connected chain fails; exposed on OnChainContextState
app/components/DashboardValidStampsPanel.tsx Shows "Couldn't load on-chain data / Try again" when onChainFetchFailed is true
app/__test-fixtures__/contextTestHelpers.tsx Added onChainFetchFailed: false to test fixture

Test plan

  • Happy path: on-chain stamps load normally — onChainFetchFailed stays false, no error UI shown
  • RPC failure: simulate by setting a bad rpcUrl in chains config — confirm error banner appears with "Try again" button
  • Retry: click "Try again" — confirm readOnChainData re-fires and clears the error on success
  • Non-connected chains failing silently: confirm only the connected chain's failure sets onChainFetchFailed

cc @calebtuttle

🤖 Generated with Claude Code

…g empty

getAttestationData was catching all RPC errors and returning undefined,
making it impossible for callers to distinguish a genuine empty attestation
from a fetch failure. onChainContext then silently reset activeChainProviders
to [] with no error state, leaving users with a blank on-chain score and no
recovery path (~4k events/wk per Datadog, ~297 distinct sessions).

Changes:
- getAttestationData now re-throws after logging so callers see the error
- onChainContext wraps per-chain fetches in individual try/catch; sets
  onChainFetchFailed=true when the connected chain fails
- onChainFetchFailed is exposed on OnChainContextState
- DashboardValidStampsPanel shows "Couldn't load on-chain data / Try again"
  when onChainFetchFailed is true

Fixes holonym-foundation/internal-docs#2543.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@0xblckmrq

Copy link
Copy Markdown
Author

Closing — this PR targets the holonym-foundation fork which uses a removed onChainContext architecture. The correct target is passportxyz/passport. A new PR will be filed there against the useQueries implementation. See holonym-foundation/internal-docs#2543.

@0xblckmrq 0xblckmrq closed this Aug 25, 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