Vetspire.Error exception (vetspire v3.0.0)

View Source

Streamline error handling

Summary

Types

t()

@type t() :: %Vetspire.Error{
  __exception__: true,
  code: term(),
  message: term(),
  meta: term()
}

Functions

__list_error_code_structs__()

Returns a list of Vetspire.Error structs, created by calling all the zero arity error generation functions in Vetspire.Error.

bad_request(opts \\ [])

conflict(entity \\ nil, opts \\ [])

deprecated(opts \\ [])

handle_postgrex_error(error, opts \\ [])

internal_server_error(opts \\ [])

locked(entity \\ nil, opts \\ [])

not_found(entity \\ nil, opts \\ [])

service_unavailable(opts \\ [])

too_many_requests(action \\ nil, opts \\ [])

unauthorized(opts \\ [])

unprocessable_entity(opts \\ [])