chore: Add more context to submission failure log#74
Conversation
|
No actionable comments were generated in the recent review. 🎉 WalkthroughThis PR introduces SubmitContext, a data structure carrying contract identification and fee-bump limitation status, through the submission flow. The handler extracts contractId from transactions and determines if they're limited, passing this context to submitWithFeeBumpAndWait for enhanced error handling and logging. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Comment |
There was a problem hiding this comment.
Pull request overview
Adds richer, structured error logging for transaction submission failures by extracting contract context (contractId + limited/default classification) and decoding Stellar transaction result XDR when available.
Changes:
- Extend
submitWithFeeBumpAndWaitto accept an optionalSubmitContextand log contract/fee details on failure. - Add
decodeTransactionResulthelper to parseTransactionResultXDR fromstatus_reasonstrings (including fee-bump inner-failure unwrap). - Add Vitest coverage for
decodeTransactionResult.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/plugin/submit.ts |
Adds context-aware failure logging and implements decodeTransactionResult XDR decoding helper. |
src/plugin/handler.ts |
Plumbs contractId and limited/default contract classification into submit logging via SubmitContext. |
test/error-sanitization.test.ts |
Adds unit tests validating decodeTransactionResult behavior across success/invalid cases. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR will add more context to submission failure logs
Summary by CodeRabbit
Release Notes
Bug Fixes
Tests