{"record":{"id":"ce74c35b67eba5a3","repo":"Comfy-Org/ComfyUI","slug":"unsupported-field","errorCode":"UNSUPPORTED_FIELD","errorMessage":"Client-provided 'id' is not supported. Asset IDs are assigned by the server.","messagePattern":"Client-provided 'id' is not supported\\. Asset IDs are assigned by the server\\.","errorType":"http","errorClass":"UploadError","httpStatus":400,"severity":"error","filePath":"app/assets/api/upload.py","lineNumber":134,"sourceCode":"                        chunk = await field.read_chunk(8 * 1024 * 1024)\n                        if not chunk:\n                            break\n                        f.write(chunk)\n                        file_written += len(chunk)\n            except Exception:\n                delete_temp_file_if_exists(tmp_path)\n                raise UploadError(\n                    500, \"UPLOAD_IO_ERROR\", \"Failed to receive and store uploaded file.\"\n                )\n\n        elif fname == \"tags\":\n            tags_raw.append((await field.text()) or \"\")\n        elif fname == \"name\":\n            provided_name = (await field.text()) or None\n        elif fname == \"user_metadata\":\n            user_metadata_raw = (await field.text()) or None\n        elif fname == \"id\":\n            raise UploadError(\n                400,\n                \"UNSUPPORTED_FIELD\",\n                \"Client-provided 'id' is not supported. Asset IDs are assigned by the server.\",\n            )\n        elif fname == \"mime_type\":\n            provided_mime_type = ((await field.text()) or \"\").strip() or None\n        elif fname == \"preview_id\":\n            provided_preview_id = ((await field.text()) or \"\").strip() or None\n    if not file_present and not (provided_hash and provided_hash_exists):\n        raise UploadError(\n            400, \"MISSING_FILE\", \"Form must include a 'file' part or a known 'hash'.\"\n        )\n\n    if (\n        file_present\n        and file_written == 0\n        and not (provided_hash and provided_hash_exists)\n    ):","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/app/assets/api/upload.py#L116-L152","documentation":"Raised from the HTTP >=400 branch (comfy_api_nodes/util/client.py:823) via _friendly_http_message only inside its own except: if formatting the message raises unexpectedly (e.g. json.dumps fails on an exotic body), the formatter falls back to 'HTTP {status}: Unknown error'. The original body is still in the request log.","triggerScenarios":"Extremely rare: a >=400 response whose body type breaks both the dict branch (json.dumps failure, e.g. non-serializable content) and the str() path; defensive last resort in _friendly_http_message's try/except.","commonSituations":"Almost never seen in practice; possible with binary bodies misparsed into the JSON branch or provider returning a body object whose repr raises.","solutions":["Inspect the logged response_content — the message deliberately omits the body","Reproduce with curl to see the raw response for the same request","Report the provider/status combination upstream if reproducible, since the body defeated the formatter"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    result = await sync_op(...)\nexcept Exception as e:\n    if re.match(r\"HTTP \\d+: Unknown error\", str(e)):\n        body = request_logger.last_response_content  # message omits the body\n        diagnose(body)\n    else:\n        raise","preventionTips":["Reproduce the failing call with curl to see the raw response the formatter could not handle","Never rely on this message alone — the body exists only in the request log"],"tags":["http-4xx","fallback","unknown-error","http"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}