# `Lightning.ExportUtils.DuplicateKeyError`
[🔗](https://github.com/OpenFn/lightning/blob/main/lib/lightning/export_utils/duplicate_key_error.ex#L1)

Raised when two entities in a project would be written into the project spec
under the same key.

A key is how the CLI addresses an entity, so two landing on the same key is
data loss: the second silently replaces the first. Keys are the entity's name
with each space turned into a hyphen, so `a b` and `a-b` collide.

Edge keys are exempt; see `disambiguate_edge_keys/1` in `ExportUtils`.

# `t`

```elixir
@type t() :: %Lightning.ExportUtils.DuplicateKeyError{
  __exception__: true,
  first: String.t(),
  key: String.t(),
  kind: String.t(),
  second: String.t()
}
```

---

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