Significant-Gravitas/AutoGPT · error · InvalidInputError

Invalid pagination parameters

Error message

Invalid pagination parameters

What it means

Error "Invalid pagination parameters" thrown in Significant-Gravitas/AutoGPT.

Source

Thrown at autogpt_platform/backend/backend/api/features/library/db.py:1911

        page: The current page index (1-based).
        page_size: Number of items to retrieve per page.
        graph_id: Agent Graph ID to filter by.

    Returns:
        A LibraryAgentPresetResponse containing a list of presets and pagination info.

    Raises:
        DatabaseError: If there's a database error during the operation.
    """
    logger.debug(
        f"Fetching presets for user #{user_id}, page={page}, page_size={page_size}"
    )

    if page < 1 or page_size < 1:
        logger.warning(
            "Invalid pagination input: page=%d, page_size=%d", page, page_size
        )
        raise InvalidInputError("Invalid pagination parameters")

    query_filter: prisma.types.AgentPresetWhereInput = {
        "userId": user_id,
        "isDeleted": False,
    }
    if graph_id:
        query_filter["agentGraphId"] = graph_id

    presets_records = await prisma.models.AgentPreset.prisma().find_many(
        where=query_filter,
        skip=(page - 1) * page_size,
        take=page_size,
        include=AGENT_PRESET_INCLUDE,
    )
    total_items = await prisma.models.AgentPreset.prisma().count(where=query_filter)
    total_pages = (total_items + page_size - 1) // page_size

    presets = [

View on GitHub (pinned to 9c8bb5550f)

Solutions

  1. Provide valid pagination parameters (positive page and page size within limits).
  2. Fix the client request to send numeric pagination values.

When it happens

Trigger: Thrown at autogpt_platform/backend/backend/api/features/library/db.py:1911 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14). Data as JSON: /api/errors/863bb7047459a601. Report an issue: GitHub.