Misago icon indicating copy to clipboard operation
Misago copied to clipboard

Http404 error from `get_object_or_404` leaks to UI in HTMX

Open rafalp opened this issue 6 months ago • 1 comments

Trying to access ThreadUpdate that doesn't exist produces this error snackbar in HTMX:

No ThreadUpdate matches the given query.

rafalp avatar Jun 14 '25 20:06 rafalp

Solution for this would be to replace all get_object_or_404 in HTMX calls with try: except Obj.DoesNotExist as error: raise Http404("Thread update not found") from error

There is a lot of those, but its for the best.

rafalp avatar Aug 18 '25 17:08 rafalp