View Source Solicit.ResponseError (solicit v1.3.2)

An error in the JSON body of an HTTP response.

Link to this section Summary

Link to this section Types

@type t() :: %Solicit.ResponseError{code: term(), description: term(), field: term()}

Link to this section Functions

Link to this function

bad_gateway(description \\ "Bad Gateway")

View Source
@spec bad_gateway(binary()) :: t()
Link to this function

bad_request(description \\ "Bad request.")

View Source
@spec bad_request(binary()) :: t()
Link to this function

conflict(description \\ "A conflict has occurred.")

View Source
@spec conflict(binary()) :: t()
Link to this function

forbidden(description \\ "This action is forbidden.")

View Source
@spec forbidden(binary()) :: t()
Link to this function

from_changeset(c, field_prefix \\ nil)

View Source
@spec from_changeset(Ecto.Changeset.t(), String.t() | nil) :: [t()]

Given an Ecto Changeset with errors, convert the errors into a list of ResponseError objects.

Link to this function

from_changeset_error(arg)

View Source
@spec from_changeset_error(tuple()) :: t() | tuple()

Given a keyword list entry, attempt to turn it into an ResponseError. Assumption: All Changeset errors are going to relate to a specific database field.

Link to this function

generic_error(description \\ "An unknown error occurred.")

View Source
@spec generic_error(binary()) :: t()
Link to this function

gone(description \\ "Access to resource is no longer available.")

View Source
@spec gone(binary()) :: t()
Link to this function

internal_server_error(description \\ "Internal Server Error")

View Source
@spec internal_server_error(binary()) :: t()
Link to this function

method_not_allowed(description \\ "Method is not allowed.")

View Source
@spec method_not_allowed(binary()) :: t()
Link to this function

not_found(description \\ "The resource was not found.")

View Source
@spec not_found(binary()) :: t()
Link to this function

request_entity_too_large(description \\ "Request entity is too large.")

View Source
@spec request_entity_too_large(binary()) :: t()
Link to this function

service_unavailable(description \\ "Service Unavailable")

View Source
@spec service_unavailable(binary()) :: t()
Link to this function

timeout(description \\ "Request timed out.")

View Source
@spec timeout(binary()) :: t()
Link to this function

too_many_requests(description \\ "Exceeded request threshold.")

View Source
@spec too_many_requests(binary()) :: t()
Link to this function

unauthorized(description \\ "Must include valid Authorization credentials")

View Source
@spec unauthorized(binary()) :: t()
Link to this function

unprocessable_entity(description \\ "Unable to process change.")

View Source
@spec unprocessable_entity(binary()) :: t()
Link to this function

unsupported_media_type(description \\ "Request contains an unsupported media type.")

View Source
@spec unsupported_media_type(binary()) :: t()