From 51ed7a647d9703accd169821e655c95e5b214394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Wed, 22 May 2019 10:15:25 +0200 Subject: [PATCH] put_project(project_dict): also log the error when we cannot PUT Previously only a ValueError was raised, which was sometimes swallowed. Instead of looking up the culprit and solving this properly, I just log the error now. --- pillar/api/projects/utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pillar/api/projects/utils.py b/pillar/api/projects/utils.py index a0883a40..29bb5280 100644 --- a/pillar/api/projects/utils.py +++ b/pillar/api/projects/utils.py @@ -198,8 +198,9 @@ def put_project(project: dict): result, _, _, status_code = current_app.put_internal('projects', proj_no_none, _id=pid) if status_code != 200: - raise ValueError(f"Can't update project {pid}, " - f"status {status_code} with issues: {result}") + message = f"Can't update project {pid}, status {status_code} with issues: {result}" + log.error(message) + raise ValueError(message) def storage(project_id: ObjectId) -> file_storage_backends.Bucket: