paperclipai/paperclip · error

limit must be a positive integer up to ${ISSUE_LIST_MAX_LIMI

Error message

limit must be a positive integer up to ${ISSUE_LIST_MAX_LIMIT}

What it means

400 from the issue list route: the limit query parameter failed validation — it must parse as a positive integer and not exceed ISSUE_LIST_MAX_LIMIT.

Source

Thrown at server/src/routes/issues.ts:6154

  }) {
    const activeRunStartedAtMs =
      toValidTimestamp(params.activeRun.startedAt) ?? toValidTimestamp(params.activeRun.createdAt);
    const commentCreatedAtMs = toValidTimestamp(params.comment.createdAt);

    if (activeRunStartedAtMs === null || commentCreatedAtMs === null) return false;
    if (params.comment.authorAgentId && params.comment.authorAgentId === params.activeRun.agentId) return false;
    return commentCreatedAtMs >= activeRunStartedAtMs;
  }
  async function getClosedIssueExecutionWorkspace(issue: { executionWorkspaceId?: string | null }) {
    if (!issue.executionWorkspaceId) return null;
    const workspace = await executionWorkspacesSvc.getById(issue.executionWorkspaceId);
    if (!workspace || !isClosedIsolatedExecutionWorkspace(workspace)) return null;
    return workspace;
  }

  // Reopen the closed isolated workspace that a guard found, so the request can
  // continue. The return value tells the caller what happened:
  //   "reopened"    - this request rebuilt the workspace and set the
  //                   reopen-pending flag. The caller must install the
  //                   consumption guard so the flag cannot leak.
  //   "already-open" - a concurrent request already reopened the workspace, so
  //                   this request did not set the flag. The caller continues but
  //                   must not install the guard, or it can clear the flag that
  //                   the other request still owns.
  //   null          - this function sent an error response, so the caller stops.
  // The reopen is scoped to the issue company and project inside the service, and
  // it runs only after the route already authorized the request on the issue.
  async function reopenClosedIssueExecutionWorkspaceOrRespond(
    req: Request,
    res: Response,
    issue: { id: string; companyId: string; projectId?: string | null },
    workspace: Pick<ExecutionWorkspace, "id">,
  ): Promise<{ outcome: "reopened" | "already-open"; generation: number } | null> {
    const actor = getActorInfo(req);
    const result = await executionWorkspacesSvc.reopenClosedIsolatedExecutionWorkspaceForIssue({
      workspaceId: workspace.id,

View on GitHub (pinned to 01ad858492)

Solutions

  1. Fix the offending parameter to satisfy the constraint stated in the error message (type, range, or allowed values), then retry.
  2. Refer to the route's request validation in the named file and the shared validators for the accepted format.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/src/routes/issues.ts:5848 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-08-18). Data as JSON: /api/errors/239b22e5f3db0a24. Report an issue: GitHub.