Skip to content

Extract the Error from a Failed Transaction's Raw XDR Result #193

@Emrys02

Description

@Emrys02

Implement the constructor that takes a decoded TransactionResult XDR, navigates into the operation results, finds the InvokeHostFunctionResult, extracts the ScError type and code, and maps them to the correct HostError variant. This is the entry point the CLI's prism decode command calls.

Implementation Guidelines

  • Navigate: TransactionResultresultsOperationResultInvokeHostFunctionResult::Err → extract ScErrorType + ScErrorCode
  • Return PrismError::NotSorobanTransaction or PrismError::TransactionSucceeded for invalid inputs

Expectations

  • What done looks like: Given any failed Soroban TX result, returns the correct HostError variant. Given a success or non-Soroban TX, returns a descriptive error.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions