Class MirrorException
Exception raised when a mirror request or simulated evm call has failed.
Implements
Inherited Members
Namespace: Hiero.Mirror
Assembly: Hiero.dll
Syntax
public class MirrorException : Exception, ISerializable
Remarks
Thrown by MirrorRestClient extension methods when the mirror node REST API returns an HTTP error response. The StatusCode property carries the HTTP status and Details contains the structured error payload returned by the mirror node (if any).
Transient codes (safe to retry): TooManyRequests (429), ServiceUnavailable (503), GatewayTimeout (504). Mirror nodes enforce rate limits; back off and retry.
Not found: a lookup of a single entity or
transaction returns null (or an empty result) for an HTTP 404
rather than throwing. Either way, "not found" is not proof that
something does not exist: the mirror node trails consensus by seconds or
more, so a transaction submitted moments ago may simply not have arrived
yet. Never treat it as proof that a transaction failed; see
ConsensusException for how to settle an unknown outcome.
Bad request (400): usually a malformed query; check the filter parameters. A simulated EVM call (CallEvmAsync(MirrorRestClient, EvmCallData, CancellationToken)) also reports a contract revert this way, with the revert data in Details; retrying returns the same answer.
Constructors
| Edit this page View SourceMirrorException(string, MirrorError[], HttpStatusCode)
Public Constructor.
Declaration
public MirrorException(string message, MirrorError[] details, HttpStatusCode code)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | The message generated by the library describing the condition that raised the exception. |
| MirrorError[] | details | The error details returned from the mirror node. |
| HttpStatusCode | code | The HTTP status code returned. |
Properties
| Edit this page View SourceDetails
The error details returned by the mirror node.
Declaration
public MirrorError[] Details { get; }
Property Value
| Type | Description |
|---|---|
| MirrorError[] |
StatusCode
The http status code returned from the mirror node request.
Declaration
public HttpStatusCode StatusCode { get; }
Property Value
| Type | Description |
|---|---|
| HttpStatusCode |