Invokes action with the failure if this is an Error. Returns this for chaining.
action
this
Result<T> onError(void Function(Failure failure) action) { if (this case Error<T>(:final failure)) action(failure); return this; }