The one JSON error body (BOU-586):
{"error": {"type": "not-found", "message": "User not found", "details": {...}, ; optional "correlation-id": "...", ; optional "dev": {...}}} ; optional, dev only (WGE code)
Everything about the failure sits inside error, so a client reads one
key. type is a string: the :type keyword of the ex-info, without its
colon. The pure part lives in wagoe.core.http.errors (BOU-930); this
namespace adds what needs JSON.
The one JSON error body (BOU-586):
{"error": {"type": "not-found",
"message": "User not found",
"details": {...}, ; optional
"correlation-id": "...", ; optional
"dev": {...}}} ; optional, dev only (WGE code)
Everything about the failure sits inside `error`, so a client reads one
key. `type` is a string: the `:type` keyword of the ex-info, without its
colon. The pure part lives in `wagoe.core.http.errors` (BOU-930); this
namespace adds what needs JSON.(body type message)(body type message opts)See wagoe.core.http.errors/body.
See `wagoe.core.http.errors/body`.
(error-body? b)See wagoe.core.http.errors/error-body?.
See `wagoe.core.http.errors/error-body?`.
(error-of response)The error map of response's body, a map or JSON a handler encoded
itself; nil when it carries none.
The `error` map of `response`'s body, a map or JSON a handler encoded itself; nil when it carries none.
(response status type message)(response status type message opts)See wagoe.core.http.errors/response.
See `wagoe.core.http.errors/response`.
(status->type status)See wagoe.core.http.errors/status->type.
See `wagoe.core.http.errors/status->type`.
(type-name t)See wagoe.core.http.errors/type-name.
See `wagoe.core.http.errors/type-name`.
(with-correlation-id {:keys [status] :as response} correlation-id)response with correlation-id in its error body when it has none: for
the bodies handlers build themselves, encoded or not (BOU-592).
`response` with `correlation-id` in its error body when it has none: for the bodies handlers build themselves, encoded or not (BOU-592).
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |