# `JSONSchex.Ref.Error`
[🔗](https://github.com/xinz/jsonschex/blob/main/lib/jsonschex/ref.ex#L14)

Error returned by `JSONSchex.Ref.resolve_selected/2`.

Fields:

- `:kind` — machine-readable error kind
- `:path` — path to the selected node containing `$ref`
- `:ref` — original `$ref` value when available
- `:uri` — resolved URI/reference when available
- `:reason` — loader, pointer, or validation detail

# `kind`

```elixir
@type kind() ::
  :missing_select
  | :invalid_select
  | :invalid_ref_value
  | :missing_base_uri
  | :missing_loader
  | :missing_external_document
  | :missing_target
  | :cycle_detected
  | :invalid_loader_response
```

# `t`

```elixir
@type t() :: %JSONSchex.Ref.Error{
  __exception__: true,
  kind: kind(),
  path: list(),
  reason: term(),
  ref: term(),
  uri: String.t() | nil
}
```

---

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