Skip to content

Commit 790bac2

Browse files
GitHKAndrei Neagu
and
Andrei Neagu
authored
if metadata file did not exist it would crash (#2201)
Co-authored-by: Andrei Neagu <[email protected]>
1 parent 4772247 commit 790bac2

File tree

1 file changed

+3
-0
lines changed
  • services/storage/src/simcore_service_storage

1 file changed

+3
-0
lines changed

services/storage/src/simcore_service_storage/handlers.py

+3
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ async def get_file_metadata(request: web.Request):
181181
location = dsm.location_from_id(location_id)
182182

183183
data = await dsm.list_file(user_id=user_id, location=location, file_uuid=file_uuid)
184+
# when no metadata is found
185+
if data is None:
186+
return {"error": "No result found", "data": {}}
184187

185188
envelope = {
186189
"error": None,

0 commit comments

Comments
 (0)