Class TransactionException
Represents an error with a transaction that passed the gateway node pre-check and was processed by the network but did not succeed.
Implements
Inherited Members
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed class TransactionException : Exception, ISerializable
Remarks
Unlike PrecheckException, a TransactionException
means the transaction did reach consensus and fees were charged,
but the resulting status indicates failure. The full receipt — including
the exchange rate at the time of execution — is available via
Receipt.
Common permanent failures: InsufficientAccountBalance, InvalidSignature, AccountDeleted, TokenNotAssociatedToAccount. These indicate a configuration or state error — do not retry.
Suppression: set
IConsensusContext.ThrowIfNotSuccess = false to prevent this
exception from being thrown. When suppressed, the caller is responsible
for inspecting receipt.Status on every returned receipt.
Properties
| Edit this page View SourceReceipt
The underlying receipt returned from the network that caused the exception (or a simulated version if not enough information has been returned from the network, such as a "receipt not found" error.)
Declaration
public TransactionReceipt Receipt { get; }
Property Value
| Type | Description |
|---|---|
| TransactionReceipt |
Status
The ResponseCode returned by the network.
Declaration
public ResponseCode Status { get; }
Property Value
| Type | Description |
|---|---|
| ResponseCode |
TransactionId
The Transaction ID generated by the library (or client code) identifying the request.
Declaration
public TransactionId TransactionId { get; }
Property Value
| Type | Description |
|---|---|
| TransactionId |