OpenUI.Error (OpenUI v0.1.1)

Copy Markdown View Source

An error in the shape of language.md, section 8.3, ready to send back to the model. to_map/1 gives the wire form.

Summary

Functions

The wire form: camelCase keys, without empty fields.

Types

source()

@type source() :: :parser | :runtime | :query | :mutation

t()

@type t() :: %OpenUI.Error{
  code: String.t(),
  component: String.t() | nil,
  hint: String.t() | nil,
  message: String.t(),
  path: String.t() | nil,
  severity: nil | :warning,
  source: source(),
  statement_id: String.t() | nil,
  tool_name: String.t() | nil
}

Functions

to_map(error)

@spec to_map(t()) :: %{required(String.t()) => String.t()}

The wire form: camelCase keys, without empty fields.