Sunil Mohan Adapa 38829a3cfa
middleware: Handle method not allowed errors and redirect
- These could happen when a user tries to reload a page that only allows POST
requests.

- Or when the generic exception handling logic in the middleware redirects the
user to a page that only allows POST.

Tests:

- Insert a exception in the diagnose() of the 'users' app. Without the patch,
running diagnostics on the users app leads to a blank page. With the patch, the
user is redirected to Diagnostics app page and the original error is shown as a
alert message.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-29 17:16:23 +02:00
..
2024-12-27 02:03:55 +01:00
2024-12-16 21:44:38 -05:00
2024-10-16 21:07:54 -07:00
2024-12-25 12:25:05 +02:00