Skip to content

Commit

Permalink
reverts changes in #5659
Browse files Browse the repository at this point in the history
  • Loading branch information
pcrespov committed Apr 16, 2024
1 parent f4a365c commit 87637bb
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions services/storage/src/simcore_service_storage/handlers_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,18 @@ async def get_file_metadata(request: web.Request) -> web.Response:
file_id=path_params.file_id,
)
except FileMetaDataNotFoundError:
# NOTE: This is what happens Larry... data must be an empty {} or else some old
# dynamic services will FAIL (sic)
# TODO: once all legacy services are gone, remove the try except, it will default to 404
# NOTE: LEGACY compatibility
# This is what happens Larry... data must be an empty {} or else some old dynamic services will FAIL (sic)
# Cannot remove until we retire all legacy services
# https://github.com/ITISFoundation/osparc-simcore/issues/5676
# https://github.com/ITISFoundation/osparc-simcore/blob/cfdf4f86d844ebb362f4f39e9c6571d561b72897/services/storage/client-sdk/python/simcore_service_storage_sdk/models/file_meta_data_enveloped.py#L34

return web.json_response(
{"error": "No result found", "data": None}, dumps=json_dumps
{"error": "No result found", "data": {}}, dumps=json_dumps
)

if request.headers.get("User-Agent") == "OpenAPI-Generator/0.1.0/python":
# LEGACY compatiblity with API v0.1.0
# NOTE: LEGACY compatiblity with API v0.1.0
# SEE models used in sdk in:
# https://github.com/ITISFoundation/osparc-simcore/blob/cfdf4f86d844ebb362f4f39e9c6571d561b72897/services/storage/client-sdk/python/simcore_service_storage_sdk/models/file_meta_data_enveloped.py#L34
# https://github.com/ITISFoundation/osparc-simcore/blob/cfdf4f86d844ebb362f4f39e9c6571d561b72897/services/storage/client-sdk/python/simcore_service_storage_sdk/models/file_meta_data_type.py#L34
Expand Down

0 comments on commit 87637bb

Please sign in to comment.