KartaWeb. API. V2. Errors
(Karta v1.0.0)
Error answers of /api/v2: an HTTP status and
{"error": {"code": "...", "message": "...", "details": [...]}}code is stable and meant for programs; details lists the fields of an
invalid request. As a plug (the render_error of
OpenApiSpex.Plug.CastAndValidate) it answers a request that does not
match the document with 422 and the fields concerned.
Summary
Functions
@spec details(Ecto.Changeset.t()) :: [map()]
The fields of an invalid changeset, for details.
@spec render(Plug.Conn.t(), pos_integer(), String.t(), String.t(), [map()]) :: Plug.Conn.t()
An error answer.