# `Ankusa.SDK.InvalidMessageError`
[🔗](https://github.com/jamescarr/ankusa/blob/sdk-elixir-v0.6.0/packages/sdk-elixir/lib/ankusa/sdk/errors.ex#L209)

The bytes aren't a valid v1 `Ankusa.Sink.Message` payload. Always
`retryable: false` — the same bytes will fail the same way.

`:code` is a stable string (`"invalid_json"`, `"not_an_object"`,
`"unsupported_version"`, `"invalid_field"`, `"ambiguous_body"`,
`"missing_body"`, `"invalid_body_base64"`, `"size_mismatch"`, `"integrity"`,
`"tenant_mismatch"`); `:field` names the offending key when `:code` is
`"invalid_field"`, else `nil`. `:reason` carries the same as an Elixir term.

# `t`

```elixir
@type t() :: %Ankusa.SDK.InvalidMessageError{
  __exception__: term(),
  code: String.t(),
  field: String.t() | nil,
  message: term(),
  reason: term(),
  retryable: term()
}
```

---

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