{"record":{"id":"701eb70dc154b5aa","repo":"Comfy-Org/ComfyUI","slug":"invalid-body","errorCode":"INVALID_BODY","errorMessage":"Provide at least one of: name, user_metadata, preview_id.","messagePattern":"Provide at least one of: name, user_metadata, preview_id\\.","errorType":"validation","errorClass":"ValueError","httpStatus":400,"severity":"warning","filePath":"app/assets/api/schemas_in.py","lineNumber":123,"sourceCode":"                raise ValueError(f\"metadata_filter must be JSON: {e}\") from e\n            if not isinstance(parsed, dict):\n                raise ValueError(\"metadata_filter must be a JSON object\")\n            return parsed\n        return None\n\n\nclass UpdateAssetBody(BaseModel):\n    name: str | None = None\n    user_metadata: dict[str, Any] | None = None\n    preview_id: str | None = None  # references an asset_reference id, not an asset id\n\n    @model_validator(mode=\"after\")\n    def _validate_at_least_one_field(self):\n        if all(\n            v is None\n            for v in (self.name, self.user_metadata, self.preview_id)\n        ):\n            raise ValueError(\n                \"Provide at least one of: name, user_metadata, preview_id.\"\n            )\n        return self\n\n\nclass CreateFromHashBody(BaseModel):\n    model_config = ConfigDict(extra=\"ignore\", str_strip_whitespace=True)\n\n    hash: str\n    name: str | None = None\n    tags: list[str] = Field(default_factory=list)\n    user_metadata: dict[str, Any] = Field(default_factory=dict)\n    mime_type: str | None = None\n    preview_id: str | None = None  # references an asset_reference id, not an asset id\n\n    @field_validator(\"hash\")\n    @classmethod\n    def _require_blake3(cls, v):","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/app/assets/api/schemas_in.py#L105-L141","documentation":"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.","triggerScenarios":"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.","commonSituations":"Normal user-initiated cancellation of a running workflow; front-end interrupt button pressed during a multi-minute generation API call.","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"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    result = await sync_op(...)\nexcept ProcessingInterrupted:\n    raise  # let ComfyUI mark execution interrupted; never swallow","preventionTips":["Never catch broad Exception around API nodes without re-raising ProcessingInterrupted","Pass a cancel_endpoint to poll ops so remote tasks are cancelled too"],"tags":["cancellation","interrupt","async","user-action"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}