{"record":{"id":"f8e3e6262cc5f9b6","repo":"paperclipai/paperclip","slug":"offset-must-be-a-non-negative-integer","errorCode":null,"errorMessage":"offset must be a non-negative integer","messagePattern":"offset must be a non-negative integer","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"server/src/routes/issues.ts","lineNumber":6158,"sourceCode":"\n    if (activeRunStartedAtMs === null || commentCreatedAtMs === null) return false;\n    if (params.comment.authorAgentId && params.comment.authorAgentId === params.activeRun.agentId) return false;\n    return commentCreatedAtMs >= activeRunStartedAtMs;\n  }\n  async function getClosedIssueExecutionWorkspace(issue: { executionWorkspaceId?: string | null }) {\n    if (!issue.executionWorkspaceId) return null;\n    const workspace = await executionWorkspacesSvc.getById(issue.executionWorkspaceId);\n    if (!workspace || !isClosedIsolatedExecutionWorkspace(workspace)) return null;\n    return workspace;\n  }\n\n  // Reopen the closed isolated workspace that a guard found, so the request can\n  // continue. The return value tells the caller what happened:\n  //   \"reopened\"    - this request rebuilt the workspace and set the\n  //                   reopen-pending flag. The caller must install the\n  //                   consumption guard so the flag cannot leak.\n  //   \"already-open\" - a concurrent request already reopened the workspace, so\n  //                   this request did not set the flag. The caller continues but\n  //                   must not install the guard, or it can clear the flag that\n  //                   the other request still owns.\n  //   null          - this function sent an error response, so the caller stops.\n  // The reopen is scoped to the issue company and project inside the service, and\n  // it runs only after the route already authorized the request on the issue.\n  async function reopenClosedIssueExecutionWorkspaceOrRespond(\n    req: Request,\n    res: Response,\n    issue: { id: string; companyId: string; projectId?: string | null },\n    workspace: Pick<ExecutionWorkspace, \"id\">,\n  ): Promise<{ outcome: \"reopened\" | \"already-open\"; generation: number } | null> {\n    const actor = getActorInfo(req);\n    const result = await executionWorkspacesSvc.reopenClosedIsolatedExecutionWorkspaceForIssue({\n      workspaceId: workspace.id,\n      issue: { id: issue.id, companyId: issue.companyId, projectId: issue.projectId ?? null },\n      actor: { agentId: actor.agentId, actorType: actor.actorType },\n    });\n    if (result.ok) {","sourceCodeStart":6140,"sourceCodeEnd":6176,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/routes/issues.ts#L6140-L6176","documentation":"400 from the issue list route: the offset query parameter failed validation — it must parse as an integer greater than or equal to zero.","triggerScenarios":"Thrown at server/src/routes/issues.ts:5852 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the offending parameter to satisfy the constraint stated in the error message (type, range, or allowed values), then retry.","Refer to the route's request validation in the named file and the shared validators for the accepted format."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}