View Source Cosmox.Response.ErrorMessage (Cosmox v0.1.0)

Represents the error message from a faulty response.

Link to this section Summary

Functions

Tries to get the error JSON object from the error message returned from the REST API.

Link to this section Types

@type t() :: %Cosmox.Response.ErrorMessage{errors: [binary()]}

Link to this section Functions

Link to this function

extract_errors_from_message(error_message)

View Source
@spec extract_errors_from_message(error_message :: binary()) ::
  {:ok, t()} | {:error, Jason.DecodeError.t()}

Tries to get the error JSON object from the error message returned from the REST API.