Liking cljdoc? Tell your friends :D

wagoe.core.http.errors

The one JSON error body (BOU-586), as data:

{:error {:type "not-found" :message "..." :details {...} :correlation-id "..." :dev {...}}}

No JSON encoding here, so a library can answer with it without the HTTP stack (BOU-930). wagoe.platform.core.http.errors delegates to these.

The one JSON error body (BOU-586), as data:

  {:error {:type "not-found" :message "..." :details {...}
           :correlation-id "..." :dev {...}}}

No JSON encoding here, so a library can answer with it without the HTTP
stack (BOU-930). `wagoe.platform.core.http.errors` delegates to these.
raw docstring

bodyclj

(body type message)
(body type message {:keys [details correlation-id dev]})

The error body. details is left out when empty.

The error body. `details` is left out when empty.
sourceraw docstring

error-body?clj

(error-body? b)

Whether b is in the one shape — with keyword or string keys, so it can judge a decoded JSON body as well as a map.

Whether `b` is in the one shape — with keyword or string keys, so it can
judge a decoded JSON body as well as a map.
sourceraw docstring

responseclj

(response status type message)
(response status type message {:keys [correlation-id] :as opts})

A Ring response carrying body. No Content-Type: muuntaja encodes a map body only when none is set (ZZP-120). The correlation id, when given, is echoed in the X-Correlation-ID header too.

A Ring response carrying `body`. No Content-Type: muuntaja encodes a map
body only when none is set (ZZP-120). The correlation id, when given, is
echoed in the X-Correlation-ID header too.
sourceraw docstring

status->typeclj

(status->type status)

The :type a handler that knows only its status answers with: ADR-022's vocabulary where it has a word, :validation-error for any other 4xx and :internal-error for any other 5xx.

The `:type` a handler that knows only its status answers with: ADR-022's
vocabulary where it has a word, `:validation-error` for any other 4xx and
`:internal-error` for any other 5xx.
sourceraw docstring

type-nameclj

(type-name t)

:not-found -> "not-found"; a qualified keyword keeps its namespace.

`:not-found` -> "not-found"; a qualified keyword keeps its namespace.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close