Elidactyl.Error (elidactyl v0.4.0)

Error struct that contains response from pterodactyl panel.

Link to this section Summary

Functions

Makes Jason encode error

Makes response parsing error

Link to this section Types

Specs

t() :: %Elidactyl.Error{
  details: map(),
  message: String.t() | nil,
  type: atom() | nil
}

Link to this section Functions

Link to this function

encode_error(error, details \\ %{})

Specs

encode_error(Jason.EncodeError.t() | Exception.t(), map()) :: t()

Makes Jason encode error

Link to this function

from_changeset(changeset, type \\ :validation_error, msg \\ nil)

Specs

from_changeset(Ecto.Changeset.t(), atom(), String.t() | nil) :: t()

Makes error struct from ecto changeset

Link to this function

invalid_response(details \\ %{})

Specs

invalid_response(map()) :: t()

Makes response parsing error