can1357/oh-my-pi · error · RpcError
Unsupported todo status: {seed.status}
Error message
Unsupported todo status: {seed.status} What it means
RpcError raised when seeding todos with a TodoItem whose status is not one of the allowed values (pending, in_progress, completed, abandoned) per _TODO_STATUS_VALUES. The client validates statuses before sending them over RPC.
Source
Thrown at python/omp-rpc/src/omp_rpc/client.py:1706
next_task_id = 1
def next_task() -> str:
nonlocal next_task_id
task_id = f"task-{next_task_id}"
next_task_id += 1
return task_id
def normalize_todo_item(seed: TodoSeed) -> JsonObject:
if isinstance(seed, str):
return {
"id": next_task(),
"content": seed,
"status": cast(JsonValue, "pending"),
}
if isinstance(seed, TodoItem):
if seed.status not in _TODO_STATUS_VALUES:
raise RpcError(f"Unsupported todo status: {seed.status}")
return {
"id": seed.id or next_task(),
"content": seed.content,
"status": cast(JsonValue, seed.status),
"notes": seed.notes,
"details": seed.details,
"blocker": seed.blocker,
}
content = seed.get("content")
if not isinstance(content, str) or not content.strip():
raise RpcError("Todo items must provide a non-empty 'content' value")
raw_id = seed.get("id")
raw_status = seed.get("status")
raw_notes = seed.get("notes")
raw_details = seed.get("details")
raw_blocker = seed.get("blocker")View on GitHub (pinned to 9690622007)
Solutions
- Use only 'pending', 'in_progress', 'completed', or 'abandoned' as TodoItem.status
- Map your application's statuses to the four supported values before seeding
- Lowercase/normalize status strings before constructing TodoItem
- Validate statuses against the TodoStatus literal type with a type checker (mypy/pyright) to catch typos statically
Example fix
// before TodoItem(id="1", content="Ship", status="done") // after TodoItem(id="1", content="Ship", status="completed")
Defensive patterns
Strategy: validation
Validate before calling
ALLOWED = {"pending", "in_progress", "completed", "abandoned"}
assert item.status in ALLOWED, f"bad todo status: {item.status!r}" Type guard
def has_valid_todo_status(item: TodoItem) -> TypeGuard[TodoItem]:
return item.status in {"pending", "in_progress", "completed", "abandoned"} Try / catch
try:
client.seed_todos(items)
except RpcError as exc:
if "Unsupported todo status" in str(exc):
items = [normalize_status(i) for i in items]
client.seed_todos(items)
else:
raise Prevention
- Use the TodoStatus literal type so type checkers catch invalid statuses
- Normalize external status strings (lowercase, map synonyms like done->completed)
- Keep a shared constant of allowed statuses next to TodoItem construction sites
When it happens
Trigger: Passing a TodoItem constructed with a custom/typo'd status string (e.g. 'done', 'open', 'InProgress') into the todo seeding/patch command.
Common situations: Migrating from another todo schema with different status enums; hand-building TodoItem dataclasses with raw strings; case-sensitivity mistakes ('Pending' vs 'pending').
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Unsupported language '{value}'. Supported: {}
- Unable to infer language from file extension: {}. Specify `l
- Invalid pattern: {err}
- Todo items must provide a non-empty 'content' value
- {field} must be one of: {expected}
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/8d8ea1590eecea61.
Report an issue: GitHub.