Show / Hide Table of Contents

Class PrecheckException

Represents the condition where a submitted transaction failed the pre-check validation by the network gateway node.

Inheritance
object
Exception
PrecheckException
Implements
ISerializable
Inherited Members
Exception.GetBaseException()
Exception.GetType()
Exception.ToString()
Exception.Data
Exception.HelpLink
Exception.HResult
Exception.InnerException
Exception.Message
Exception.Source
Exception.StackTrace
Exception.TargetSite
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.ReferenceEquals(object, object)
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 Source

PrecheckException(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.

| Edit this page View Source

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 Source

RequiredFee

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
| Edit this page View Source

Status

The status code returned by the gateway node.

Declaration
public ResponseCode Status { get; }
Property Value
Type Description
ResponseCode
| Edit this page View Source

TxId

The transaction ID corresponding to the request that failed.

Declaration
public TransactionId TxId { get; }
Property Value
Type Description
TransactionId

Implements

ISerializable
  • Edit this page
  • View Source
In this article
Back to top .NET Client Library for Hiero Network and Hedera Hashgraph