Execute whenError if the Result is an error.
whenError
@override R? onError<R>(R Function(E error) whenError) => null;