Comfy-Org/ComfyUI · error · UploadError
UNSUPPORTED_FIELD
UNSUPPORTED_FIELD
Error message
Client-provided 'id' is not supported. Asset IDs are assigned by the server.
What it means
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.
Source
Thrown at app/assets/api/upload.py:134
chunk = await field.read_chunk(8 * 1024 * 1024)
if not chunk:
break
f.write(chunk)
file_written += len(chunk)
except Exception:
delete_temp_file_if_exists(tmp_path)
raise UploadError(
500, "UPLOAD_IO_ERROR", "Failed to receive and store uploaded file."
)
elif fname == "tags":
tags_raw.append((await field.text()) or "")
elif fname == "name":
provided_name = (await field.text()) or None
elif fname == "user_metadata":
user_metadata_raw = (await field.text()) or None
elif fname == "id":
raise UploadError(
400,
"UNSUPPORTED_FIELD",
"Client-provided 'id' is not supported. Asset IDs are assigned by the server.",
)
elif fname == "mime_type":
provided_mime_type = ((await field.text()) or "").strip() or None
elif fname == "preview_id":
provided_preview_id = ((await field.text()) or "").strip() or None
if not file_present and not (provided_hash and provided_hash_exists):
raise UploadError(
400, "MISSING_FILE", "Form must include a 'file' part or a known 'hash'."
)
if (
file_present
and file_written == 0
and not (provided_hash and provided_hash_exists)
):View on GitHub (pinned to 1c6d8d45b3)
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
Defensive patterns
Strategy: try-catch
Try / catch
try:
result = await sync_op(...)
except Exception as e:
if re.match(r"HTTP \d+: Unknown error", str(e)):
body = request_logger.last_response_content # message omits the body
diagnose(body)
else:
raise Prevention
- 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
When it happens
Trigger: 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.
Common situations: Almost never seen in practice; possible with binary bodies misparsed into the JSON branch or provider returning a body object whose repr raises.
Related errors
- UNSUPPORTED_MEDIA_TYPE
- HASH_CHECK_FAILED
- UPLOAD_IO_ERROR
- Sonilo API error ({resp.status}): {msg}
- Failed to download (HTTP {resp.status}).
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/ce74c35b67eba5a3.
Report an issue: GitHub.