Skip to content

Refactor Soroban exception filter to use typed error mapping#400

Open
Gezziy wants to merge 2 commits into
code-flexing:mainfrom
Gezziy:expection-fiLter
Open

Refactor Soroban exception filter to use typed error mapping#400
Gezziy wants to merge 2 commits into
code-flexing:mainfrom
Gezziy:expection-fiLter

Conversation

@Gezziy
Copy link
Copy Markdown

@Gezziy Gezziy commented May 31, 2026

closes #373
Summary of Changes:
Added SorobanErrorCode and ERROR_MAP for deterministic error-to-status mapping.
Replaced fragile substring-based Soroban error detection with structured error-code extraction.
Added support for Horizon result codes, Stellar RPC statuses, JSON-RPC numeric errors, timeout codes, errorResultXdr, and exact HostError(...) diagnostics.
Added focused unit tests for Soroban error mapping and fallback behavior.

Reason for the Changes:
The previous implementation depended on SDK error-message substring checks, which can silently break when Stellar SDK, Horizon, or Soroban RPC messages change. Typed error-code mapping is more stable, easier to test, and aligned with Stellar’s documented error structures.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 31, 2026

@TochukwuJustice is attempting to deploy a commit to the vic's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 31, 2026

@Gezziy Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

#638 Refactor SorobanExceptionFilter to use error type mapping

2 participants