# `Mailglass.MigrationVersionError`
[🔗](https://github.com/szTheory/mailglass/blob/v2.6.0/lib/mailglass/migration_version_error.ex#L1)

Raised when migration version metadata cannot be trusted.

A missing package anchor is the only catalog state that represents version
zero. Query failures and malformed metadata stop migration control flow so a
caller cannot mistake an unavailable or corrupt database for a fresh install.

# `reason`

```elixir
@type reason() ::
  :query_failed
  | :missing_comment
  | :invalid_comment
  | :unexpected_result
  | :out_of_range
```

# `t`

```elixir
@type t() :: %Mailglass.MigrationVersionError{
  __exception__: true,
  cause: term(),
  message: String.t(),
  package: :mailglass | :mailglass_inbound,
  prefix: String.t(),
  reason: reason()
}
```

# `new`

```elixir
@spec new(
  reason(),
  keyword()
) :: t()
```

---

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