findError method
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);
}
Returns the first error or cause matching given type.
WagmiError? findError(WagmiErrors errorName) {
if (name == errorName) return this;
if (cause == null) return null;
return cause!.findError(errorName);
}