Class PrecheckException
Represents the condition where a submitted transaction failed the pre-check validation by the network gateway node.
Implements
Inherited Members
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed class PrecheckException : Exception, ISerializable
Remarks
A precheck failure means the transaction never reached consensus — no fees were charged and no state was changed. Inspect Status to determine why the gateway rejected it.
Transient codes (safe to retry with back-off):
Busy,
PlatformTransactionNotCreated. The SDK
auto-retries these based on IConsensusContext.RetryCount and
RetryDelay; if you see a PrecheckException with one of
these codes it means the retry budget was exhausted.
Permanent codes (do not retry): InvalidSignature, InsufficientAccountBalance, InvalidTransactionBody — fix the request configuration before resubmitting.
If Status is
InsufficientTxFee, the
RequiredFee property contains the minimum fee (in tinybars)
the gateway expects — increase IConsensusContext.FeeLimit to at
least this amount and retry.
Constructors
| Edit this page View SourcePrecheckException(string, TransactionId, ResponseCode, ulong)
Exception constructor.
Declaration
public PrecheckException(string message, TransactionId transaction, ResponseCode code, ulong requiredFee)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | A message describing the nature of the problem. |
| TransactionId | transaction | The transaction ID corresponding to the request that failed. |
| ResponseCode | code | The status code returned by the gateway node. |
| ulong | requiredFee | The cost value returned for insufficient transaction fee errors. |
PrecheckException(string, TransactionId, ResponseCode, ulong, Exception)
Exception constructor.
Declaration
public PrecheckException(string message, TransactionId transaction, ResponseCode code, ulong requiredFee, Exception innerException)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | A message describing the nature of the problem. |
| TransactionId | transaction | The transaction ID corresponding to the request that failed. |
| ResponseCode | code | The status code returned by the gateway node. |
| ulong | requiredFee | The cost value returned for insufficient transaction fee errors. |
| Exception | innerException | Inner exception causing this error, typically reserved for fundamental GRPC pipeline exceptions. |
Properties
| Edit this page View SourceRequiredFee
If the returned status is InsufficientTxFee this value will contain the transaction fee necessary to execute the transaction.
Declaration
public ulong RequiredFee { get; }
Property Value
| Type | Description |
|---|---|
| ulong |
Status
The status code returned by the gateway node.
Declaration
public ResponseCode Status { get; }
Property Value
| Type | Description |
|---|---|
| ResponseCode |
TxId
The transaction ID corresponding to the request that failed.
Declaration
public TransactionId TxId { get; }
Property Value
| Type | Description |
|---|---|
| TransactionId |