# `Assent.MissingParamError`
[🔗](https://github.com/pow-auth/assent/blob/v0.4.0/lib/assent.ex#L48)

An exception for when a required parameter is missing.

The `:params` field is omitted from `Inspect` output as it may contain
sensitive data.

## Fields

  * `:key` - the missing parameter name
  * `:params` - the original parameters
  * `:source` - whether the parameters came from regular params or a token

## Examples

    iex> {:error, error} = Assent.fetch_token_param(%{"access_token" => "secret"}, "refresh_token")
    iex> Exception.message(error)
    "expected \"refresh_token\" in token, got: [\"access_token\"]"
    iex> inspect(error)
    "#Assent.MissingParamError<key: \"refresh_token\", source: :token, ...>"

# `t`

```elixir
@type t() :: %Assent.MissingParamError{
  __exception__: term(),
  key: binary(),
  params: map(),
  source: :params | :token
}
```

# `message`

---

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