# `Latch.Error.Discovery`

Authorization-server discovery failed for a PDS.

## `reason` values

  * `:no_authorization_server` - the PDS exposes no authorization server
  * `:resource_mismatch` - the PRM `resource` is not the PDS URL
  * `:issuer_mismatch` - the AS metadata issuer is not the discovered URL
  * `{:missing_metadata field}` - a required AS metadata field is missing
  * `{:invalid_metadata, field}` - a required AS metadata field has invalid value
  * `:insecure_scheme` - a PDS or authorization server URL used HTTP instead of HTTPS

# `t`

```elixir
@type t() :: %Latch.Error.Discovery{
  __exception__: term(),
  pds_endpoint: String.t() | nil,
  reason: atom() | {atom(), String.t()}
}
```

---

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