onError property

OnData<TParsed>? onError

Implementation

OnData<TParsed>? get onError {
  if (options.onError != null && options.errorPolicy != ErrorPolicy.ignore) {
    return (QueryResult? result) {
      if (!result!.isLoading && result.hasException) {
        return options.onError!(result.exception);
      }
    };
  }
  return null;
}