CatalogApi v0.0.16 CatalogApi.Fault 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

Link to this type t() View Source
t() :: %CatalogApi.Fault{
  detail: String.t(),
  faultcode: String.t(),
  faultstring: String.t()
}

Link to this section Functions

Link to this function cast(fault_json) View Source
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
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.