manganese_core_kit v0.1.0 Manganese.CoreKit.Structs.APIError
Represents an error that occurred in the data layer of the application. All actions should either succeed or fail with an API error.
Link to this section Summary
Functions
Given two API errors, return the one with the greater HTTP response status.
Link to this section Types
Link to this type
t()
t() :: %Manganese.CoreKit.Structs.APIError{ message: String.t() | nil, status: Manganese.CoreKit.Enumerations.HttpStatusCode.t() | nil, type: atom() }
Link to this section Functions
Link to this function
prioritize(api_error1, api_error2)
Given two API errors, return the one with the greater HTTP response status.
If the statuses are the same, api_error1
will take precedence.