# `AshNeo4j.Error.UnsupportedIdentity`
[🔗](https://github.com/diffo-dev/ash_neo4j/blob/v0.10.1/lib/error.ex#L182)

**Returned** (never raised) when an `identity` can't be enforced as a Neo4j
uniqueness constraint (#20), so it can't be created by `AshNeo4j.Constraint` —
and is refused rather than skipped, since silently leaving it unenforced would
permit the duplicate/split records the constraint exists to prevent.

Two cases Neo4j's `REQUIRE … IS UNIQUE` can't express:

  * `nils_distinct?: false` — Neo4j treats `nil`s as distinct (a node missing a
    listed property is not constrained) and can't be made to treat them as equal.
  * a **filtered** identity (`where:`) — Neo4j has no partial/filtered constraint.

Drop the unsupported option, or enforce that identity another way (it won't fall
back to a database constraint). The same refusal is raised at compile time by
`AshNeo4j.Verifiers.VerifyIdentities`.

# `exception`

```elixir
@spec exception(opts :: Keyword.t()) :: %AshNeo4j.Error.UnsupportedIdentity{
  __exception__: term(),
  bread_crumbs: term(),
  class: term(),
  identity: term(),
  keys: term(),
  path: term(),
  reason: term(),
  resource: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}
```

Create an `Elixir.AshNeo4j.Error.UnsupportedIdentity` without raising it.

## Keys

- :resource
- :identity
- :keys
- :reason

---

*Consult [api-reference.md](api-reference.md) for complete listing*
