findError method

WagmiError? findError(
  1. WagmiErrors errorName
)

Returns the first error or cause matching given type.

Implementation

WagmiError? findError(WagmiErrors errorName) {
  if (name == errorName) return this;

  if (cause == null) return null;

  return cause!.findError(errorName);
}