setEntityError method

void setEntityError(
  1. String type,
  2. String id,
  3. String? error
)

Implementation

void setEntityError(String type, String id, String? error) {
  _write(() {
    final k = _ek(type, id);
    _entityStates[k] = (_entityStates[k] ?? const EntityState()).copyWith(
      isFetching: false,
      error: error,
      clearError: error == null,
    );
    _notifyEntity(type, id);
  });
}