Liking cljdoc? Tell your friends :D

wagoe.platform.core.http.error-pages

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`.
raw docstring

htmx-responseclj

(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.
sourceraw docstring

htmx?clj

(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.
sourceraw docstring

page-errorclj

(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.
sourceraw docstring

page-responseclj

(page-response response body)

response with body, HTML, in place of the error body.

`response` with `body`, HTML, in place of the error body.
sourceraw docstring

toast-triggerclj

(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.
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