Skip to content

fix(sdk): point MissingTrustlineError at /api/v1/tx/add-trustline - #1119

Open
solaawojobi00-bit wants to merge 1 commit into
drydocs:mainfrom
solaawojobi00-bit:fix/issue-1103-missing-trustline-route
Open

solaawojobi00-bit wants to merge 1 commit into
drydocs:mainfrom
solaawojobi00-bit:fix/issue-1103-missing-trustline-route

Conversation

@solaawojobi00-bit

Copy link
Copy Markdown
Contributor

fix(sdk): point MissingTrustlineError at /api/v1/tx/add-trustline

Problem

MissingTrustlineError tells API clients to call POST /api/v1/tx/trustline, a route that does not exist. api/v1/tx/[action].ts maps "add-trustline" and returns 404 for any other action, so a client following the message gets a 404.

Scenario Before After
One missing trustline "...via POST /api/v1/tx/trustline..." (404) "...via POST /api/v1/tx/add-trustline..."
Several missing trustlines "...via POST /api/v1/tx/trustline..." (404) "...via POST /api/v1/tx/add-trustline..."

Solution

Correct both message variants to name the route the API actually serves.

Changes

  • packages/stellar-sdk-helpers/src/tx.ts: both message strings now use /api/v1/tx/add-trustline.
  • packages/api-core/src/tx.test.ts: the two assertions on the message text now expect the corrected route.

Regression Tests

Acceptance criterion Test
Error text names the route the API serves packages/api-core/src/tx.test.ts (two message assertions, updated)
Tests asserting the message are updated same file
helpers tests and typecheck pass see Testing

Testing

pnpm --filter @meridian/stellar-sdk-helpers test
 Test Files  23 passed (23)
      Tests  522 passed (522)

pnpm --filter @meridian/api-core test
 Test Files  5 passed (5)
      Tests  73 passed (73)

pnpm typecheck
 Tasks:    12 successful, 12 total

Notes for Reviewers

Text-only change; no behavior or API surface change. api-core resolves helpers through dist, so rebuild helpers before running its tests.

Closes #1103

@drips-wave

drips-wave Bot commented Oct 18, 2026

Copy link
Copy Markdown

@solaawojobi00-bit Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

This branch has not been deployed

No deployments
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] MissingTrustlineError points callers at a nonexistent trustline route

1 participant