mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-10-01 15:01:36 +00:00
571 B
571 B
layout | title |
---|---|
layout.njk | </> htmx - hx-error-url |
hx-error-url
The hx-error-url
attribute allows you to send client-side errors to a specified URL. It is typically put on the
body tag, so all errors are caught and send to the server.
<body hx-error-url="/errors">\
</body>
When a client side error is caught by htmx it will be POST
-ed to the given URL, with the following JSON format:
{ "elt": elt.id, "event": eventName, "detail" : detail }
Notes
hx-error-url
is inherited and can be placed on a parent element