isTerminal property

bool Function(Object error)? isTerminal
final

Whether the given error is unrecoverable, ending the runtime instead of retrying.

By default every failure is retried with backoff, on the assumption that hubs come back. That is wrong for a rejection the node cannot fix by trying again — a revoked key, an unknown node id, a refused enrolment — where reconnecting just hammers the hub forever. Return true for those: the loop stops, NodeRuntime.state settles on NodeState.stopped, and the cause is left in NodeRuntime.terminalError.

Implementation

final bool Function(Object error)? isTerminal;