onFailure method
Implementation
Future<NEResult<T>> onFailure(FutureOr Function(int, String?) action) async {
return then<NEResult<T>>((value) async {
if (!value.isSuccess()) {
await action(value.code, value.msg);
}
return value;
});
}