langgenius/dify · error · ValueError
Invalid UUID format in creator_ids.
Error message
Invalid UUID format in creator_ids.
What it means
Raised by AppListBaseQuery.validate_creator_ids when any stripped item fails uuid.UUID() parsing. Items are normalized to stringified UUIDs; a malformed value re-raises as 'Invalid UUID format in creator_ids.' inside a Pydantic ValidationError.
Source
Thrown at api/controllers/console/app/app.py:140
raise ValueError("Invalid UUID format in tag_ids.") from exc
@field_validator("creator_ids", mode="before")
@classmethod
def validate_creator_ids(cls, value: list[str] | None) -> list[str] | None:
if not value:
return None
if not isinstance(value, list):
raise ValueError("Unsupported creator_ids type.")
items = [str(item).strip() for item in value if item and str(item).strip()]
if not items:
return None
try:
return [str(uuid.UUID(item)) for item in items]
except ValueError as exc:
raise ValueError("Invalid UUID format in creator_ids.") from exc
class RecentAppListQuery(BaseModel):
limit: int = Field(default=8, ge=1, le=8, description="Number of recently modified apps to return (1-8)")
class AppListQuery(AppListBaseQuery):
pass
class StarredAppListQuery(AppListBaseQuery):
pass
class CreateAppPayload(BaseModel):
name: str = Field(..., min_length=1, description="App name")
description: str | None = Field(default=None, description="App description (max 400 chars)", max_length=400)
mode: Literal["chat", "agent-chat", "advanced-chat", "workflow", "completion"] = Field(..., description="App mode")View on GitHub (pinned to ef8544b173)
Solutions
- Use full account UUIDs from the accounts/members endpoint.
- Validate UUID format client-side before submitting the query.
- Strip whitespace and confirm canonical 8-4-4-4-12 format.
Example fix
// before const creatorIds = members.map(m => m.email); // after const creatorIds = members.map(m => m.id); // account UUID
Defensive patterns
Strategy: validation
Validate before calling
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
function filterValidCreatorUuids(ids) { return (ids || []).filter((id) => UUID_RE.test(id)); } Type guard
const isUuid = (v) => typeof v === 'string' && UUID_RE.test(v);
Try / catch
try { await axios.get('/apps', { params }); }
catch (e) { if (/Invalid UUID format in creator_ids/.test(e.message)) params.creator_ids = filterValidCreatorUuids(params.creator_ids); } Prevention
- Source creator IDs only from the accounts/members endpoint.
- Validate UUID format client-side before submitting.
- Never substitute emails or names for account UUIDs.
When it happens
Trigger: Passing a non-UUID string (email, username, integer, partial ID) in creator_ids; URL-encoding that mangles the UUID; stale IDs from a different environment.
Common situations: Frontend stores creator emails instead of account IDs; copy-paste of partial account ID from UI; cross-tenant account ID leakage.
Related errors
- Invalid UUID format in tag_ids.
- Unsupported tag_ids type.
- Unsupported creator_ids type.
- tracing_provider is required when enabled is True
- Unsupported query list type.
AI-assisted analysis of langgenius/dify@ef8544b173 (2026-08-12).
Data as JSON: /api/errors/d3dc1941ed6fc4a7.
Report an issue: GitHub.