fix: refund error handling - #17
Open
ipierago wants to merge 1 commit into
Open
Conversation
|
|
Contributor
|
Hi @ipierago. Thank you for your contribution. I evaluated the PR and agree with the solution. If you could sign our Contributor License Agreement, I will be able to merge this. |
tomwheeler
self-requested a review
November 6, 2025 02:37
tomwheeler
approved these changes
Nov 6, 2025
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.
What was changed
The catch clause for errors in the refund activity was moved.
Why?
When the refund activity executes successfully, it throws an error to indicate that the workflow has failed but that the funds were refunded. However, this error is caught by another catch clause and subsequently rethrown with additional error information. This second catch clause is intended to catch errors in the refund activity, but it is in the wrong place.
The result is that if the refund succeeds, the workflow result has the confusing message that the refund both failed and succeeded.
Checklist
How was this tested:
Follow the instructions in the temporarl documentation on how to simulate a failed deposit.
The resulting error message is that the deposit failed but the refund was successfully executed.