Replies: 2 comments 1 reply
-
|
(Non an answer) Just to throw ideas on how to behave here,
I guess that proper self-healing behaviour would be to retry ephemeral errors and to allow surfacing errors (after retrying if needed) in some error-specific target element. This is kind of off-topic On HTMX 4 they changed how |
Beta Was this translation helpful? Give feedback.
-
|
Thanks, glad you like it! µJS fires a You can listen to this event to handle errors however you want. For example, if you want the browser to display the server's error page natively: document.addEventListener("mu:fetch-error", function(e) {
window.location = e.detail.url;
});This forces a full page load on error, letting Django's error page render normally. You could also display a notification, log the error, or show a custom message depending on That said, I'm open to suggestions if you think there's a simpler way to handle this. Feel free to open a discussion so we can explore ideas together before any code is written. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I hope you are doing great, nice lib.
I currently have mujs setup in a django project of mine, minor inconvenience is that mujs basically swallow 5XX responses, unless I look at my terminal I can't tell when a 5xx happened, the page just seems to do nothing. What would be the idiomatic way to fix this ?
Beta Was this translation helpful? Give feedback.
All reactions