From cd4d83200320dec0c37194b21c74902250f906fa Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Sat, 18 Apr 2026 16:20:55 +0200 Subject: [PATCH] Adjust: respond with 500 in case principal collection cannot be created (e.g. filesystem issues) --- radicale/app/__init__.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/radicale/app/__init__.py b/radicale/app/__init__.py index e8594fe9..9956e023 100644 --- a/radicale/app/__init__.py +++ b/radicale/app/__init__.py @@ -540,9 +540,13 @@ class Application(ApplicationPartDelete, ApplicationPartHead, except ValueError as e: logger.warning("Failed to create predefined collection %r: %s", name_coll, e) except ValueError as e: - logger.warning("Failed to create principal " - "collection %r: %s", user, e) - user = "" + logger.error("Failed to create principal " + "collection for user %r: ValueError %s", user, e) + return response(*httputils.INTERNAL_SERVER_ERROR) + except OSError as e: + logger.error("Failed to create principal " + "collection for user %r: OSerror %s", user, e) + return response(*httputils.INTERNAL_SERVER_ERROR) else: logger.warning("Access to principal path %r denied by " "rights backend", principal_path)