From a5e373c8c127b2fe2164879838d1b4fc6d8ad613 Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Sat, 21 Mar 2026 08:31:26 +0100 Subject: [PATCH] chatch PermissionError and respond 500 --- radicale/app/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/radicale/app/__init__.py b/radicale/app/__init__.py index b64e2c4b..c1e3d8ff 100644 --- a/radicale/app/__init__.py +++ b/radicale/app/__init__.py @@ -549,8 +549,12 @@ class Application(ApplicationPartDelete, ApplicationPartHead, else: profiler_active = True - status, headers, answer, xml_request = function( - environ, base_prefix, path, user, remote_host, remote_useragent) + try: + status, headers, answer, xml_request = function( + environ, base_prefix, path, user, remote_host, remote_useragent) + except PermissionError as e: + logger.error("PermissionError: %s", e) + status, headers, answer, xml_request = httputils.INTERNAL_SERVER_ERROR # Profiling if self._profiling_per_request: