Skip to content

Conversation

@drichar
Copy link
Contributor

@drichar drichar commented Jan 19, 2026

Summary

Moves the addSwapTransactions() call inside the existing try/catch block in execute() so that errors during transaction processing are logged with comprehensive failure context before being re-thrown.

Previously, only errors from atc.execute() received debug logging via logSwapExecutionFailure(). Errors thrown during transaction processing (such as "Failed to process swap transaction at index X") would propagate without any debug context, making it harder to diagnose intermittent issues reported by developers.

Changes

  • composer.ts: Moved addSwapTransactions() call inside the try/catch block in execute() method

Test Plan

  • All existing tests pass (186 tests)
  • Error handling behavior unchanged - errors still propagate to calling code
  • Debug logging now captures transaction processing failures

Move `addSwapTransactions()` call inside the try/catch block in
`execute()` so that errors during transaction processing (such as
"Failed to process swap transaction at index X") are logged with
comprehensive failure context via `logSwapExecutionFailure()` before
being re-thrown to the developer's code.

Previously, only errors from `atc.execute()` received debug logging,
making it harder to diagnose intermittent transaction processing issues.
@drichar drichar merged commit 6992d83 into main Jan 19, 2026
1 check passed
@drichar drichar deleted the fix/execute-error-logging branch January 19, 2026 20:46
txnlab-release-bot bot added a commit that referenced this pull request Jan 19, 2026
## [2.0.4](v2.0.3...v2.0.4) (2026-01-19)

### Bug Fixes

* **composer:** include transaction processing errors in debug logging ([#6](#6)) ([6992d83](6992d83))
@txnlab-release-bot
Copy link
Contributor

🎉 This PR is included in version 2.0.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants