# `MishkaPay.Errors.BadSignature`
[🔗](https://github.com/mishka-group/mishka_pay/blob/v0.0.1/lib/mishka_pay/__errors/bad_signature.ex#L5)

A webhook message that cannot be trusted, so nothing in it is used.

  * `:provider`: the provider's id.
  * `:reason`: `:missing` (no signature header), `:malformed` (a header or body that cannot be
    read), `:too_old` (signed outside the allowed time window, perhaps replayed), `:mismatch`
    (signed with another secret, or changed on the way), `:mode` (a live message checked with
    test keys, or the other way round), `:account` (about another account than the
    connected account the tenant acts for).

# `exception`

```elixir
@spec exception(opts :: Keyword.t()) :: %MishkaPay.Errors.BadSignature{
  __exception__: term(),
  bread_crumbs: term(),
  class: term(),
  path: term(),
  provider: term(),
  reason: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}
```

Create an `Elixir.MishkaPay.Errors.BadSignature` without raising it.

## Keys

- :provider
- :reason

---

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