CatalogApi.Fault (CatalogApi v0.0.17) View Source

Defines the structure and casting of a CatalogApi Fault structure which is how CatalogApi reports handled errrs.

Link to this section Summary

Functions

Safely casts some extracted json of the fault itself to a %Fault{} struct.

Extracts a %Fault{} struct from previously parsed json of the entire fault response.

Link to this section Types

Specs

t() :: %CatalogApi.Fault{
  detail: String.t(),
  faultcode: String.t(),
  faultstring: String.t()
}

Link to this section Functions

Specs

cast(map()) :: t()

Safely casts some extracted json of the fault itself to a %Fault{} struct.

Link to this function

extract_fault_from_json(arg1)

View Source

Specs

extract_fault_from_json(any()) ::
  {:ok, t()} | {:error, :unparseable_catalog_api_fault}

Extracts a %Fault{} struct from previously parsed json of the entire fault response.