mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-14 11:07:24 +08:00
Strip absolute module_path from /custom_node_startup_errors response
The absolute on-disk path is internal detail the frontend/Manager has no use for. Keep it in the in-memory NODE_STARTUP_ERRORS dict for server-side debugging, but exclude it from the public API payload. The user-facing identifier remains module_name (and pyproject.pack_id when available). Ref: ComfyUI-Launcher#303 Amp-Thread-ID: https://ampcode.com/threads/T-019e23a1-2acc-7619-bd0e-f783d1368ef3 Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
parent
af55a2308f
commit
6220400ad5
@ -757,6 +757,8 @@ class PromptServer():
|
||||
async def get_custom_node_startup_errors(request):
|
||||
# Group errors by source ("custom_node" / "comfy_extra" / "api_node")
|
||||
# so the frontend/Manager can render them in distinct sections.
|
||||
# `module_path` is stripped because the absolute on-disk path is
|
||||
# internal detail that the frontend has no use for.
|
||||
grouped: dict[str, dict[str, dict]] = {
|
||||
"custom_node": {},
|
||||
"comfy_extra": {},
|
||||
@ -764,7 +766,8 @@ class PromptServer():
|
||||
}
|
||||
for entry in nodes.NODE_STARTUP_ERRORS.values():
|
||||
source = entry.get("source", "custom_node")
|
||||
grouped.setdefault(source, {})[entry["module_name"]] = entry
|
||||
public_entry = {k: v for k, v in entry.items() if k != "module_path"}
|
||||
grouped.setdefault(source, {})[entry["module_name"]] = public_entry
|
||||
return web.json_response(grouped)
|
||||
|
||||
@routes.get("/api/jobs")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user