mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2026-11-04 23:37:31 +00:00
[GH-ISSUE #2740] Bug: KeyError 'mode' in fetch_customnode_list when query parameter is missing #1025
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/ComfyUI-Manager#1025
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @HuangYuChuh on GitHub (Mar 29, 2026).
Original GitHub issue: https://github.com/Comfy-Org/ComfyUI-Manager/issues/2740
Description
The
/customnode/getlistendpoint crashes with aKeyErrorwhen themodequery parameter is not provided in the request. The handler atglob/manager_server.py:877accessesrequest.rel_url.query["mode"]directly without a default value, while theskip_updateparameter on line 872 correctly uses.get().Steps to Reproduce
/customnode/getlistwithout themodequery parameterKeyError: 'mode'Error Traceback
Root Cause
In
glob/manager_server.py, thefetch_customnode_listhandler uses direct dictionary accessrequest.rel_url.query["mode"]on lines 877, 882, and 883, which raisesKeyErrorifmodeis not present.Note that
skip_updateon line 872 already uses the safe.get()pattern:But
modedoes not:Suggested Fix
Use
request.rel_url.query.get("mode", "default")(or an appropriate default value) instead of direct dictionary access on lines 877, 882, and 883. For example:Environment