Skip to content

Commit 2fb4c92

Browse files
committed
fix(mm): directory path leakage on scan folder error
1 parent 3fdceba commit 2fb4c92

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

invokeai/app/api/routers/model_manager.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,10 @@ async def scan_for_models(
273273
found_model = FoundModel(path=path, is_installed=is_installed)
274274
scan_results.append(found_model)
275275
except Exception as e:
276+
error_type = type(e).__name__
276277
raise HTTPException(
277278
status_code=500,
278-
detail=f"An error occurred while searching the directory: {e}",
279+
detail=f"An error occurred while searching the directory: {error_type}",
279280
)
280281
return scan_results
281282

0 commit comments

Comments
 (0)