Skip to content

fix(lib): stop collapsing getStreamAddress failures into 'stream not … - #410

Merged
Jaydbrown merged 1 commit into
conduit-protocol:mainfrom
Tobi-8:fix/stream-address-error-propagation
Aug 31, 2026
Merged

fix(lib): stop collapsing getStreamAddress failures into 'stream not …#410
Jaydbrown merged 1 commit into
conduit-protocol:mainfrom
Tobi-8:fix/stream-address-error-propagation

Conversation

@Tobi-8

@Tobi-8 Tobi-8 commented Aug 30, 2026

Copy link
Copy Markdown

Summary

  • getStreamAddress no longer collapses every failure into null.
  • null is returned only for scvVoid (factory says the stream ID does not exist).
  • RPC/network/timeout errors and a missing NEXT_PUBLIC_FACTORY_CONTRACT_ID
    (already raised loudly by isMock()) now propagate, so /stream/[id] shows
    the real error instead of a misleading "Stream not found" for an existing stream.
  • Updated the lib/stream.test.ts case that asserted the old swallow-to-null
    behavior, and added a page-level regression test asserting the error surfaces.

Testing

  • lib/stream.test.ts: getStreamAddress address-lookup case updated to assert rejection; passing.
  • app/stream/[id]/__tests__/page.test.tsx: new test verifying an address-lookup rejection renders the error, not "Stream not found"; all 7 tests pass.
  • ESLint clean on changed files.

Closes #383

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.

Bug: getStreamAddress swallows every error into null — RPC/network failure is indistinguishable from "stream not found"

2 participants