invoke-ai/InvokeAI · error · HTTPException
Board not found
Error message
Board not found
What it means
_assert_board_write_access looks up the board DTO and, if any exception occurs during lookup (e.g. BoardRecordNotFoundException), raises HTTP 404 "Board not found". Called before add_video_to_board / remove_video_from_board, it means the target board_id does not exist (or the board store lookup failed).
Source
Thrown at invokeai/app/api/routers/videos.py:138
return
owner = ApiDependencies.invoker.services.video_records.get_user_id(video_name)
if owner is not None and owner == current_user.user_id:
return
raise HTTPException(status_code=403, detail="Not authorized to move this video")
def _assert_board_write_access(board_id: str, current_user: CurrentUserOrDefault) -> None:
"""Raise 403 if the current user may not mutate the given board.
Mirrors _assert_board_write_access in board_images.py: admins and the board owner
may write; public boards accept contributions from any user.
"""
from invokeai.app.services.board_records.board_records_common import BoardVisibility
try:
board = ApiDependencies.invoker.services.boards.get_dto(board_id=board_id)
except Exception:
raise HTTPException(status_code=404, detail="Board not found")
if current_user.is_admin:
return
if board.user_id == current_user.user_id:
return
if board.board_visibility == BoardVisibility.Public:
return
raise HTTPException(status_code=403, detail="Not authorized to modify this board")
def _assert_video_read_access(video_name: str, current_user: CurrentUserOrDefault) -> None:
"""Raise 403 if the current user may not view the video."""
from invokeai.app.services.board_records.board_records_common import (
BoardRecordNotFoundException,
BoardVisibility,
)
if current_user.is_admin:
returnView on GitHub (pinned to 0b6a024f2f)
Solutions
- List current boards via GET /api/v1/boards/ and use a valid board_id
- Recreate the board if it was deleted, then retry
- Fix hardcoded board IDs in scripts after DB changes
- Check the board-record store (sqlite) if the board exists in the UI but not via API lookup
Example fix
# before
requests.post(f"{base}/api/v1/videos/{v}/board", json={"board_id": stale_id})
# after
boards = requests.get(f"{base}/api/v1/boards/").json()
board_id = next(b["board_id"] for b in boards if b["board_name"] == "My Board")
requests.post(f"{base}/api/v1/videos/{v}/board", json={"board_id": board_id}) Defensive patterns
Strategy: validation
Validate before calling
boards = requests.get(f"{base}/api/v1/boards/").json()
assert any(b["board_id"] == board_id for b in boards), f"board {board_id} missing" Try / catch
try:
requests.post(f"{base}/api/v1/videos/{name}/board", json={"board_id": board_id}).raise_for_status()
except requests.HTTPError as e:
if e.response.status_code == 404:
board_id = pick_board_from_list() Prevention
- Refresh board IDs after any board deletion or DB rebuild
- Never hardcode board UUIDs in scripts
- Handle 404 by re-listing boards rather than retrying
When it happens
Trigger: POST/DELETE /api/v1/videos/{video}/board with a board_id that was deleted, never existed, is mistyped, or belongs to another database/instance.
Common situations: Client cached board IDs before a board was deleted; automation scripts with hardcoded board UUIDs; DB rebuilds regenerating board IDs; copy-pasted board IDs between installs.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/f86cee18dc342585.
Report an issue: GitHub.