PB.DecodeError exception (PB v0.2.0)

Copy Markdown View Source

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.

Summary

Types

Which structural-decode failure this is.

t()

Types

kind()

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

Which structural-decode failure this is.

t()

@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()
}