{"record":{"id":"028424bf08bfe9bc","repo":"paperclipai/paperclip","slug":"lines-must-be-a-positive-integer","errorCode":null,"errorMessage":"--lines must be a positive integer.","messagePattern":"--lines must be a positive integer\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/service.ts","lineNumber":220,"sourceCode":"\n  common(service.command(\"restart\").description(\"Hot-restart the service while preserving active agent runs\"))\n    .option(\"--wait\", \"Wait for active runs to drain instead of adopting them\", false)\n    .option(\"--expected-version <version>\", \"Require the restarted server to report this version\")\n    .action(async (opts) => output(await restartManagedService({ instanceId: opts.instance, expectedVersion: opts.expectedVersion, waitForDrain: opts.wait }), opts.json));\n\n  common(service.command(\"status\").description(\"Show supervisor and health status\")).action(async (opts) => {\n    const manager = await resolveManager(opts); if (!manager) return;\n    const instanceId = resolvePaperclipInstanceId(opts.instance);\n    output({ ...await manager.status(), health: await probeHealth(instanceId) }, opts.json);\n  });\n\n  common(service.command(\"logs\").description(\"Show service logs\"))\n    .option(\"-f, --follow\", \"Follow new log output\", false)\n    .option(\"-n, --lines <count>\", \"Number of recent lines\", \"100\")\n    .action(async (opts) => {\n      const manager = await resolveManager(opts); if (!manager) return;\n      const lines = Number.parseInt(opts.lines, 10);\n      if (!Number.isInteger(lines) || lines < 1) throw new Error(\"--lines must be a positive integer.\");\n      await manager.logs(opts.follow, lines);\n    });\n}\n","sourceCodeStart":202,"sourceCodeEnd":224,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/cli/src/commands/service.ts#L202-L224","documentation":"The service logs command parses --lines as a positive integer and the provided value is not one; a generic numeric-option guard.","triggerScenarios":"Thrown at cli/src/commands/service.ts:220 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a positive integer to --lines."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}