Skip to content

fix(pay): forward provider error identity; mark failed payment spans ERROR (#8,#9)#44

Merged
AquiGorka merged 2 commits into
mainfrom
fix/error-bubbling
Jul 6, 2026
Merged

fix(pay): forward provider error identity; mark failed payment spans ERROR (#8,#9)#44
AquiGorka merged 2 commits into
mainfrom
fix/error-bubbling

Conversation

@AquiGorka

Copy link
Copy Markdown
Contributor

Mid-flight error-bubbling fix (ClickUp 86c8t0zux, half 2). Part of the coordinated landing anchored by moonlight-sdk#39 / provider-platform#131.

Holes fixed

  • ci: add mainnet deploy workflow #8 /pay/* handlers forward the provider/on-chain error code+message through pay-platform's own PlatformError + PIPE_APIError pipeline (mapped to an allowed status), instead of swallowing it behind a catch-all 500/502.
  • feat: add waitlist POST endpoint #9 failed payments mark their span ERROR with recordException (was resolving green because the handler try/catch sat inside withSpan).

Cause chains preserved on baseError; only a safe {code,message} reaches the wire.

Tests

test:unit 27/0 · test:integration 29/0 (deno 2.8.2). Exercised live in test.sh pos-instant (5/0) and testnet run-local.

SDK: no new symbol used here — stays on jsr:@moonlight/moonlight-sdk@^0.11.0 (CI green independent of the SDK publish).

AquiGorka added 2 commits July 1, 2026 18:42
Payment handlers now forward the provider/on-chain error code+message
through pay-platform's PlatformError + PIPE_APIError pipeline instead of
swallowing it behind a catch-all 500/502 (#8), mapping upstream status
to the allowed error-status set. Each failed payment marks its span
ERROR with recordException, preserving the cause chain (#9).
@AquiGorka
AquiGorka requested a review from pselle July 2, 2026 20:11
@AquiGorka
AquiGorka merged commit a18e279 into main Jul 6, 2026
7 checks passed
@AquiGorka
AquiGorka deleted the fix/error-bubbling branch July 6, 2026 12:27
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