invoke-ai/InvokeAI · warning · HTTPException

Board not found

Error message

Board not found

What it means

HTTP 404 returned by GET /boards/{board_id} when boards.get_dto cannot find the board. Because the router swallows every exception into 404, this also fires for backend DB errors, not just genuinely missing boards.

Source

Thrown at invokeai/app/api/routers/boards.py:74

    """Creates a board for the current user"""
    try:
        result = ApiDependencies.invoker.services.boards.create(board_name=board_name, user_id=current_user.user_id)
        return result
    except Exception:
        raise HTTPException(status_code=500, detail="Failed to create board")


@boards_router.get("/{board_id}", operation_id="get_board", response_model=BoardDTO)
def get_board(
    current_user: CurrentUserOrDefault,
    board_id: str = Path(description="The id of board to get"),
) -> BoardDTO:
    """Gets a board (user must have access to it)"""

    try:
        result = ApiDependencies.invoker.services.boards.get_dto(board_id=board_id)
    except Exception:
        raise HTTPException(status_code=404, detail="Board not found")

    # Admins can access any board.
    # Owners can access their own boards.
    # Shared and public boards are visible to all authenticated users.
    if (
        not current_user.is_admin
        and result.user_id != current_user.user_id
        and result.board_visibility == BoardVisibility.Private
    ):
        raise HTTPException(status_code=403, detail="Not authorized to access this board")

    return result


@boards_router.patch(
    "/{board_id}",
    operation_id="update_board",
    responses={

View on GitHub (pinned to 0b6a024f2f)

Solutions

  1. List boards via GET /boards/ and confirm the board_id exists
  2. Refresh the UI/urls — the board was likely deleted concurrently
  3. Check the board_id for typos or cross-install mixing
  4. If server logs show a DB error rather than 'not found', fix connectivity/migrations

Example fix

// before
const board = await api.get(`/boards/${boardId}`);
// after
try {
  const board = await api.get(`/boards/${boardId}`);
} catch (e) {
  if (e.response?.status === 404) return refetchBoardList(); // stale id
  throw e;
}
Defensive patterns

Strategy: try-catch

Validate before calling

const known = (await api.get('/boards/')).items.map(b => b.board_id);
if (!known.includes(boardId)) throw new Error(`stale board id: ${boardId}`);

Type guard

const isNotFound = (e) => e?.response?.status === 404;

Try / catch

try {
  return await api.get(`/boards/${boardId}`);
} catch (e) {
  if (isNotFound(e)) return null; // stale/deleted board — refresh list
  if (e.response?.status === 403) throw new Error('board is private; request access');
  throw e;
}

Prevention

When it happens

Trigger: GET /boards/{board_id} with a board_id that was deleted, never existed, or comes from a stale/cached reference; also raised when the underlying service throws any exception (e.g. DB down).

Common situations: Frontend holding a board id after the board was deleted elsewhere, copied URL from another install/database, or id typo in scripts; also hits after switching the data directory.

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/2b940fba935cc0a0. Report an issue: GitHub.