Euclid.Sugar.error

You're seeing just the function error, go back to Euclid.Sugar module for more information.

Specs

error(term()) :: {:error, term()}

Wraps a term in an :error tuple. Useful in pipelines.

Examples

iex> %{} |> Map.put(:count, "unknown") |> Euclid.Sugar.error()
{:error, %{count: "unknown"}}