NotLeaderException.fromCause constructor

NotLeaderException.fromCause(
  1. GrpcError error
)

Constructs a new instance of NotLeaderException from given error

Implementation

factory NotLeaderException.fromCause(GrpcError error) => NotLeaderException(
      error.trailers?[Exceptions.LeaderEndpointHost] ??
          InternetAddress.anyIPv4.address,
      int.parse(error.trailers?[Exceptions.LeaderEndpointPort] ?? '0'),
      cause: error,
    );