Misago
Misago copied to clipboard
Http404 error from `get_object_or_404` leaks to UI in HTMX
Trying to access ThreadUpdate that doesn't exist produces this error snackbar in HTMX:
No ThreadUpdate matches the given query.
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.