Represents a normalized runtime error.
@type severity() :: :info | :warning | :error | :fatal
@type t() :: %CliSubprocessCore.Payload.Error{ code: String.t() | nil, extra: map(), message: String.t(), metadata: map(), severity: severity() }
@spec new(keyword() | map() | struct()) :: struct()
@spec parse(keyword() | map() | struct()) :: {:ok, struct()} | {:error, {:invalid_payload, module(), CliSubprocessCore.Schema.error_detail()}}
@spec parse!(keyword() | map() | struct()) :: struct()
@spec schema() :: Zoi.schema()
@spec to_map(struct()) :: map()