What
In HorizonApi.TransactionFailedExtras, result_codes.operations is typed as required (operations: string[]), but Horizon omits the field when a transaction fails a transaction-level check (e.g. tx_bad_seq) and no operations were evaluated — verified against a live network in #1526. The type should be operations?: string[] to match the wire format.
Why deferred
Making the field optional is a source-breaking TypeScript change under strictNullChecks: existing unguarded reads like result_codes.operations.map(...) stop compiling. #1526 shipped the runtime-safe parts instead — TransactionFailedError.getResultCodes() normalizes the omitted field to [] — and deferred the wire-type fix to the next major release. The field carries a doc comment with a TODO(next major) marker in src/horizon/horizon_api.ts.
To do (next major)
- Change
operations: string[] to operations?: string[] in TransactionFailedExtras and remove the TODO comment
- Mark as breaking in the changelog
🤖 Generated with Claude Code
What
In
HorizonApi.TransactionFailedExtras,result_codes.operationsis typed as required (operations: string[]), but Horizon omits the field when a transaction fails a transaction-level check (e.g.tx_bad_seq) and no operations were evaluated — verified against a live network in #1526. The type should beoperations?: string[]to match the wire format.Why deferred
Making the field optional is a source-breaking TypeScript change under
strictNullChecks: existing unguarded reads likeresult_codes.operations.map(...)stop compiling. #1526 shipped the runtime-safe parts instead —TransactionFailedError.getResultCodes()normalizes the omitted field to[]— and deferred the wire-type fix to the next major release. The field carries a doc comment with aTODO(next major)marker insrc/horizon/horizon_api.ts.To do (next major)
operations: string[]tooperations?: string[]inTransactionFailedExtrasand remove the TODO comment🤖 Generated with Claude Code