invoke-ai/InvokeAI · error · HTTPException
Failed to create board
Error message
Failed to create board
What it means
HTTP 500 from POST /boards/ (create_board) when the boards service create() call throws any exception. The router intentionally converts every non-HTTP error into this generic 500, so name conflicts, validation, or DB issues must be diagnosed from server logs.
Source
Thrown at invokeai/app/api/routers/boards.py:61
@boards_router.post(
"/",
operation_id="create_board",
responses={
201: {"description": "The board was created successfully"},
},
status_code=201,
response_model=BoardDTO,
)
def create_board(
current_user: CurrentUserOrDefault,
board_name: str = Query(description="The name of the board to create", max_length=300),
) -> BoardDTO:
"""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 (View on GitHub (pinned to 0b6a024f2f)
Solutions
- Check server logs for the underlying exception
- Retry with a different, shorter board_name (avoid duplicates)
- Verify DB connectivity and schema migrations are current
- Call GET /boards first to check for an existing board with the same name
Example fix
// before
await api.post('/boards/', { board_name: 'My Board' });
// after
const existing = (await api.get('/boards/')).items.find(b => b.board_name === 'My Board');
const board = existing ?? await api.post('/boards/', { board_name: 'My Board' }); Defensive patterns
Strategy: try-catch
Validate before calling
const boards = (await api.get('/boards/')).items;
if (boards.some(b => b.board_name === desiredName)) throw new Error('board name already in use'); Type guard
const isServerError = (e) => e?.response?.status >= 500;
Try / catch
try {
return await api.post('/boards/', { board_name });
} catch (e) {
if (isServerError(e)) throw new Error(`Create board failed — check invokeai server logs; name: ${board_name}`);
throw e;
} Prevention
- Check for an existing board with the same name before creating
- Keep board_name short and free of exotic characters
- Ensure DB migrations are current after upgrading InvokeAI
- Monitor DB connectivity in the server logs
When it happens
Trigger: POST /boards/ with body {board_name} when ApiDependencies.invoker.services.boards.create throws — duplicate/over-long board_name rejected by storage, or database failure.
Common situations: Creating a board whose name already exists in a backend that enforces uniqueness, board_name exceeding DB column length, or SQLite/Postgres outage.
Related errors
- Failed to remove image from board
- Failed to add images to board
- Failed to remove images from board
- Failed to update board
- Failed to delete board
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/c151fd4c7941c305.
Report an issue: GitHub.