Skip to content

fix: add 8 s HTTP timeout to rpc.Server in fetchDefindexPosition - #218

Merged
collinsezedike merged 1 commit into
mainfrom
fix/positions-rpc-timeout
Jun 21, 2026
Merged

collinsezedike merged 1 commit into
mainfrom
fix/positions-rpc-timeout

Conversation

@collinsezedike

@collinsezedike collinsezedike commented Jun 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Passed { timeout: 8_000 } to the rpc.Server constructor in fetchDefindexPosition, matching the 8 s pattern already used by AbortSignal.timeout(8_000) in defilamma.ts
  • The Blend path (fetchBlendPositions) already had a withTimeout wrapper — no change needed there
  • The HTTP-level timeout fires at 8 s, giving the caller a clean rejection well before Vercel's 10 s function deadline

Test plan

  • New test in defindex.test.ts captures rpc.Server constructor args via a module-level class override and asserts { timeout: 8_000 } is passed
  • All 80 tests in @meridian/stellar-sdk-helpers pass

Closes #161

@vercel

vercel Bot commented Jun 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
meridian Ready Ready Preview, Comment Jun 21, 2026 4:10pm

@collinsezedike
collinsezedike merged commit 647adca into main Jun 21, 2026
5 checks passed
@collinsezedike
collinsezedike deleted the fix/positions-rpc-timeout branch June 21, 2026 16:10

This branch was successfully deployed

1 active deployment
Preview — aa6d7b31 Deployed Jun 21, 2026 by vercel[bot]
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.

[Fix] Add timeout to Stellar RPC calls in positions endpoint

1 participant