fix(pay): forward provider error identity; mark failed payment spans ERROR (#8,#9)#44
Merged
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mid-flight error-bubbling fix (ClickUp 86c8t0zux, half 2). Part of the coordinated landing anchored by moonlight-sdk#39 / provider-platform#131.
Holes fixed
/pay/*handlers forward the provider/on-chain errorcode+messagethrough pay-platform's ownPlatformError+PIPE_APIErrorpipeline (mapped to an allowed status), instead of swallowing it behind a catch-all500/502.recordException(was resolving green because the handler try/catch sat insidewithSpan).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).