Significant-Gravitas/AutoGPT · error · InvalidInputError

Invalid pagination input

Error message

Invalid pagination input

What it means

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

Source

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

            listing itself — e.g. ``has_external_trigger`` / ``trigger_setup_info``,
            which are False/None without nodes (used by the copilot to recognise
            webhook-trigger agents without re-reading the full graph).

    Returns:
        A LibraryAgentResponse containing the list of agents and pagination details.

    Raises:
        DatabaseError: If there is an issue fetching from Prisma.
    """
    logger.debug(
        f"Fetching library agents for user_id={user_id}, "
        f"search_term={repr(search_term)}, "
        f"sort_by={sort_by}, page={page}, page_size={page_size}"
    )

    if page < 1 or page_size < 1:
        logger.warning(f"Invalid pagination: page={page}, page_size={page_size}")
        raise InvalidInputError("Invalid pagination input")

    if search_term and len(search_term.strip()) > 100:
        logger.warning(f"Search term too long: {repr(search_term)}")
        raise InvalidInputError("Search term is too long")

    where_clause: prisma.types.LibraryAgentWhereInput = {
        "userId": user_id,
        "isDeleted": False,
        "isArchived": False,
    }
    # Library entries are personal bookmarks (per-user favorites/folders),
    # so org context scopes rather than shares: the caller's own rows in
    # the active org, plus untagged pre-backfill rows. Nested in AND so it
    # can't collide with the search OR-clause below.
    if organization_id is not None:
        where_clause["AND"] = [
            {
                "OR": [

View on GitHub (pinned to 9c8bb5550f)

Solutions

  1. Provide a valid page number (>=1) and page size within allowed limits.
  2. Check the client request parameters for negative or non-numeric pagination values.

When it happens

Trigger: Thrown at autogpt_platform/backend/backend/api/features/library/db.py:155 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/eb72255919352957. Report an issue: GitHub.