From 61fef9c9df4efafb50fd297caeae67f7351b6568 Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Sat, 18 May 2024 13:30:26 +0200 Subject: [PATCH] extend error message for "Bad PUT request" --- radicale/app/put.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/radicale/app/put.py b/radicale/app/put.py index cf2a15fb..ec433db2 100644 --- a/radicale/app/put.py +++ b/radicale/app/put.py @@ -133,7 +133,7 @@ class ApplicationPartPut(ApplicationBase): try: content = httputils.read_request_body(self.configuration, environ) except RuntimeError as e: - logger.warning("Bad PUT request on %r: %s", path, e, exc_info=True) + logger.warning("Bad PUT request on %r (read_request_body): %s", path, e, exc_info=True) return httputils.BAD_REQUEST except socket.timeout: logger.debug("Client timed out", exc_info=True) @@ -145,7 +145,7 @@ class ApplicationPartPut(ApplicationBase): vobject_items = radicale_item.read_components(content or "") except Exception as e: logger.warning( - "Bad PUT request on %r: %s", path, e, exc_info=True) + "Bad PUT request on %r (read_components): %s", path, e, exc_info=True) return httputils.BAD_REQUEST (prepared_items, prepared_tag, prepared_write_whole_collection, prepared_props, prepared_exc_info) = prepare( @@ -199,7 +199,7 @@ class ApplicationPartPut(ApplicationBase): props = prepared_props if prepared_exc_info: logger.warning( - "Bad PUT request on %r: %s", path, prepared_exc_info[1], + "Bad PUT request on %r (prepare): %s", path, prepared_exc_info[1], exc_info=prepared_exc_info) return httputils.BAD_REQUEST @@ -216,7 +216,7 @@ class ApplicationPartPut(ApplicationBase): self._hook.notify(hook_notification_item) except ValueError as e: logger.warning( - "Bad PUT request on %r: %s", path, e, exc_info=True) + "Bad PUT request on %r (create_collection): %s", path, e, exc_info=True) return httputils.BAD_REQUEST else: assert not isinstance(item, storage.BaseCollection) @@ -238,7 +238,7 @@ class ApplicationPartPut(ApplicationBase): self._hook.notify(hook_notification_item) except ValueError as e: logger.warning( - "Bad PUT request on %r: %s", path, e, exc_info=True) + "Bad PUT request on %r (upload): %s", path, e, exc_info=True) return httputils.BAD_REQUEST headers = {"ETag": etag}