# `PB.DecodeError`
[🔗](https://github.com/hansihe/pb_ex/blob/v0.2.0/pb/lib/pb/decode_error.ex#L1)

Structurally invalid serialized input: protobuf wire bytes that are truncated
or malformed, or JSON or text format input that is not well-formed for the
target. The `:format` field discriminates `:wire`, `:json` and `:text`.

Text format errors carry the 1-based `:line` and `:column` of the problem.
See `PB.Error`.

# `kind`

```elixir
@type kind() :: :malformed | :malformed_json | :malformed_text | :duplicate_field
```

Which structural-decode failure this is.

# `t`

```elixir
@type t() :: %PB.DecodeError{
  __exception__: term(),
  column: pos_integer() | nil,
  details: map(),
  format: :wire | :json | :text | nil,
  kind: kind() | nil,
  line: pos_integer() | nil,
  message_name: atom() | nil,
  operation: PB.Error.operation() | nil,
  path: [PB.Error.path_element()],
  reason: term()
}
```

---

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