Comfy-Org/ComfyUI · warning · ValueError
INVALID_BODY
INVALID_BODY
Error message
Provide at least one of: name, user_metadata, preview_id.
What it means
Raised as ProcessingInterrupted from the core request loop (comfy_api_nodes/util/client.py:757) when an interruption monitor task completes before the in-flight HTTP request. The client races req_task against monitor_task; if the monitor (ComfyUI interruption flag) fires first, the request task is cancelled and this exception propagates so the node aborts promptly instead of finishing the network call.
Source
Thrown at app/assets/api/schemas_in.py:123
raise ValueError(f"metadata_filter must be JSON: {e}") from e
if not isinstance(parsed, dict):
raise ValueError("metadata_filter must be a JSON object")
return parsed
return None
class UpdateAssetBody(BaseModel):
name: str | None = None
user_metadata: dict[str, Any] | None = None
preview_id: str | None = None # references an asset_reference id, not an asset id
@model_validator(mode="after")
def _validate_at_least_one_field(self):
if all(
v is None
for v in (self.name, self.user_metadata, self.preview_id)
):
raise ValueError(
"Provide at least one of: name, user_metadata, preview_id."
)
return self
class CreateFromHashBody(BaseModel):
model_config = ConfigDict(extra="ignore", str_strip_whitespace=True)
hash: str
name: str | None = None
tags: list[str] = Field(default_factory=list)
user_metadata: dict[str, Any] = Field(default_factory=dict)
mime_type: str | None = None
preview_id: str | None = None # references an asset_reference id, not an asset id
@field_validator("hash")
@classmethod
def _require_blake3(cls, v):View on GitHub (pinned to 1c6d8d45b3)
Solutions
- No fix needed — this is intentional cancellation semantics, not a defect
- If cancellations surprise you, check whether your wrapper catches ProcessingInterrupted and re-raises it, letting ComfyUI mark the execution interrupted
- Ensure cancel_endpoint is configured in poll-style ops so the remote task is also cancelled server-side
Defensive patterns
Strategy: try-catch
Try / catch
try:
result = await sync_op(...)
except ProcessingInterrupted:
raise # let ComfyUI mark execution interrupted; never swallow Prevention
- Never catch broad Exception around API nodes without re-raising ProcessingInterrupted
- Pass a cancel_endpoint to poll ops so remote tasks are cancelled too
When it happens
Trigger: User clicks cancel/interrupt in the ComfyUI UI while an API node has an in-flight request; queue cancellation during a long synchronous API call; any monitor_progress/interrupt-flag source completing while the request is pending.
Common situations: Normal user-initiated cancellation of a running workflow; front-end interrupt button pressed during a multi-minute generation API call.
Related errors
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/701eb70dc154b5aa.
Report an issue: GitHub.