What a browser is shown for an error body: a page for a /web request, a
toast for an htmx one. An API caller, or a script asking for JSON, keeps the
body of wagoe.platform.core.http.errors.
What a browser is shown for an error body: a page for a /web request, a toast for an htmx one. An API caller, or a script asking for JSON, keeps the body of `wagoe.platform.core.http.errors`.
(htmx-response response {:keys [message]})response for htmx: its status kept, so nothing is swapped, and the message
as an error toast. A toast the handler already asked for wins.
`response` for htmx: its status kept, so nothing is swapped, and the message as an error toast. A toast the handler already asked for wins.
(htmx? request)Whether htmx sent request for a fragment. A history restore asks for a
whole page.
Whether htmx sent `request` for a fragment. A history restore asks for a whole page.
(page-error request {:keys [status] :as response}){:status :type :message :correlation-id}, and :refusal for an
authorization refusal, when response to request carries the JSON error
body and a browser should see a page instead; nil otherwise. A handler's own
HTML is left alone.
`{:status :type :message :correlation-id}`, and `:refusal` for an
authorization refusal, when `response` to `request` carries the JSON error
body and a browser should see a page instead; nil otherwise. A handler's own
HTML is left alone.(page-response response body)response with body, HTML, in place of the error body.
`response` with `body`, HTML, in place of the error body.
(toast-trigger message)The HX-Trigger value components.js shows as an error toast.
The HX-Trigger value components.js shows as an error toast.
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 |