TezartNodeError class

Exception thrown when an error occurs during an RPC node call.

You can translate the error messages using key or type.

try {
  await RpcFailingCall();
} on TezartNodeError catch (e) {
  print(e.message); // "You're trying to reveal an already revealed key."
  print(e.key); // 'alreadyRevealedKey'
}

Constructors

TezartNodeError({required TezartNodeErrorTypes type, String? message, dynamic metadata})
Default constructor.
TezartNodeError.fromHttpError(TezartHttpError? cause)
Named constructor to construct TezartNodeError by passing a TezartHttpError object.

Properties

cause TezartHttpError?
final
dynamicErrorMessages Map<TezartNodeErrorTypes, Function>
final
hashCode int
The hash code for this object.
no setterinherited
key String
String representation of type.
no setter
message String
Human readable explanation of this.
no setter
metadata Map<String, String>
final
originalException TezartHttpError?
Cause of this.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
staticErrorsMessages Map<TezartNodeErrorTypes, String>
no setter
type TezartNodeErrorTypes
Type of this.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited