Dowser.UnknownFieldError exception (Dowser.Client v0.5.0)

View Source

A document holds a field its mapping doesn't declare, under unknown_fields: :raise.

:path is the field, from the document's root (["author", "nickname"]), and :direction whether it was met while loading a document (:load) or dumping one (:dump).

By default (unknown_fields: :keep) such a field is left as it is. :raise is for the applications — and the test suites — that would rather know: a field the mapping doesn't declare is one an index with "dynamic": "strict" rejects, or one another client wrote without the mapping saying so.

Summary

Types

t()

@type t() :: %Dowser.UnknownFieldError{
  __exception__: true,
  direction: :load | :dump,
  path: [String.t()]
}