From 5fcb5cf56c57802248c14cae605d2f88cdc0945a Mon Sep 17 00:00:00 2001 From: Pedro Crespo-Valero <32402063+pcrespov@users.noreply.github.com> Date: Tue, 26 Nov 2024 21:47:33 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20`aiohttp`=20deprecation:?= =?UTF-8?q?=20Using=20`web.json=5Fresponse`=20to=20return=20`2XX`=20respon?= =?UTF-8?q?ses=20instead=20of=20raising=20`HttpException`=20(#6829)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/simcore_service_storage/handlers_simcore_s3.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/services/storage/src/simcore_service_storage/handlers_simcore_s3.py b/services/storage/src/simcore_service_storage/handlers_simcore_s3.py index 248c415b23f..bfbe41e1806 100644 --- a/services/storage/src/simcore_service_storage/handlers_simcore_s3.py +++ b/services/storage/src/simcore_service_storage/handlers_simcore_s3.py @@ -18,7 +18,6 @@ parse_request_query_parameters_as, ) from servicelib.logging_utils import log_context -from servicelib.mimetype_constants import MIMETYPE_APPLICATION_JSON from settings_library.s3 import S3Settings from . import sts @@ -79,8 +78,10 @@ async def _copy_folders_from_project( task_progress=task_progress, ) - raise web.HTTPCreated( - text=json_dumps(body.destination), content_type=MIMETYPE_APPLICATION_JSON + return web.json_response( + {"data": jsonable_encoder(body.destination)}, + status=status.HTTP_201_CREATED, + dumps=json_dumps, )