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

**Returned** (never raised) for an internal invariant the data layer couldn't
satisfy — an input shape it didn't expect, or a relationship/aggregate path it
couldn't resolve (#372). Distinct from the `Unsupported*` / `Requires*` family
(deliberate refusals, `:invalid`) and from `Neo4j` (server errors): this is "we
reached a state we shouldn't have", so its class is `:unknown`.

Carries a `:detail` string (and optional `:context`) for diagnosis. A typed,
matchable replacement for the bare-string `{:error, "…"}` returns the data layer
used to leak — which Ash wrapped as `Ash.Error.Unknown.UnknownError`, unclassified
and only substring-matchable.

# `exception`

```elixir
@spec exception(opts :: Keyword.t()) :: %AshNeo4j.Error.Internal{
  __exception__: term(),
  bread_crumbs: term(),
  class: term(),
  context: term(),
  detail: term(),
  path: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}
```

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

## Keys

- :detail
- :context

---

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