mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-10-09 11:02:12 -03:00
fix(civitai): surface missing-model diagnostics and anchor image-page URL parsing
- Return the ResourceNotFoundError detail from get_civitai_versions and get_model_versions_status instead of a bare "Model not found", and let the download modal display the server-provided message - Anchor extract_civitai_image_id / extractCivitaiImageId to ^/images/<id> so API paths and partial numeric IDs are rejected, same as the model-page parsing fix in #1140
This commit is contained in:
@@ -2881,9 +2881,10 @@ class ModelLibraryHandler:
|
||||
|
||||
try:
|
||||
response = await metadata_provider.get_model_versions(model_id)
|
||||
except ResourceNotFoundError:
|
||||
except ResourceNotFoundError as exc:
|
||||
return web.json_response(
|
||||
{"success": False, "error": "Model not found"}, status=404
|
||||
{"success": False, "error": str(exc) or "Model not found"},
|
||||
status=404,
|
||||
)
|
||||
if not response or not response.get("modelVersions"):
|
||||
return web.json_response(
|
||||
|
||||
Reference in New Issue
Block a user