parseConnectionError function

WCException parseConnectionError(
  1. WCException e,
  2. String url,
  3. String type
)

Implementation

WCException parseConnectionError(WCException e, String url, String type) {
  return (e.message != null && e.message!.contains("getaddrinfo ENOTFOUND") ||
          e.message!.contains("connect ECONNREFUSED"))
      ? WCException('Unavailable $type RPC url at $url')
      : e;
}