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.
This commit is contained in:
@@ -198,8 +198,9 @@ def put_project(project: dict):
|
|||||||
result, _, _, status_code = current_app.put_internal('projects', proj_no_none, _id=pid)
|
result, _, _, status_code = current_app.put_internal('projects', proj_no_none, _id=pid)
|
||||||
|
|
||||||
if status_code != 200:
|
if status_code != 200:
|
||||||
raise ValueError(f"Can't update project {pid}, "
|
message = f"Can't update project {pid}, status {status_code} with issues: {result}"
|
||||||
f"status {status_code} with issues: {result}")
|
log.error(message)
|
||||||
|
raise ValueError(message)
|
||||||
|
|
||||||
|
|
||||||
def storage(project_id: ObjectId) -> file_storage_backends.Bucket:
|
def storage(project_id: ObjectId) -> file_storage_backends.Bucket:
|
||||||
|
Reference in New Issue
Block a user