{"record":{"id":"29ea4770f9537cce","repo":"earendil-works/pi","slug":"parsed-diagnostics-map-diagnostic-diagnostic","errorCode":null,"errorMessage":"parsed.diagnostics.map((diagnostic) => diagnostic.message).join(\"\\n\")","messagePattern":"parsed\\.diagnostics\\.map\\(\\(diagnostic\\) => diagnostic\\.message\\)\\.join\\(\"\\\\n\"\\)","errorType":"exception","errorClass":"AuthCommandError","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/main.ts","lineNumber":157,"sourceCode":"\t} catch (error) {\n\t\tconst message = error instanceof AuthCommandError ? error.message : \"Failed to parse auth command\";\n\t\tconsole.error(chalk.red(`Error: ${message}`));\n\t\tprocess.exitCode = 1;\n\t\treturn true;\n\t}\n\tif (!command) return false;\n\n\tconst parsed = parseArgs(command.args);\n\tif (parsed.unknownFlags.size > 0) {\n\t\tconst option = parsed.unknownFlags.keys().next().value;\n\t\tconsole.error(chalk.red(`Unknown option --${option} for \"${getAuthCommandName(command.kind)}\".`));\n\t\tconsole.error(chalk.dim(`Use \"${APP_NAME} --help\" or \"${getAuthCommandUsage(command.kind)}\".`));\n\t\tprocess.exitCode = 1;\n\t\treturn true;\n\t}\n\ttry {\n\t\tif (parsed.diagnostics.length > 0) {\n\t\t\tthrow new AuthCommandError(parsed.diagnostics.map((diagnostic) => diagnostic.message).join(\"\\n\"));\n\t\t}\n\t\tif (command.kind !== \"check\") {\n\t\t\tconst signal = AbortSignal.timeout(15_000);\n\t\t\tconst modelRuntime = await ModelRuntime.create({ allowModelNetwork: false, signal });\n\t\t\tconst credential = await resolveCredentialForPrint(\n\t\t\t\tparsed,\n\t\t\t\tmodelRuntime,\n\t\t\t\tcommand.kind,\n\t\t\t\tcommand.minExpiryMs,\n\t\t\t\tsignal,\n\t\t\t);\n\t\t\tprocess.stdout.write(`${credential}\\n`);\n\t\t\treturn true;\n\t\t}\n\n\t\tconst requestedAuth = validateAuthCommandArgs(parsed, command.kind);\n\t\tlet result: AuthCheckResult;\n\t\tlet credential: string | undefined;","sourceCodeStart":139,"sourceCodeEnd":175,"githubUrl":"https://github.com/earendil-works/pi/blob/4af9d21d3b4d664e4a29fcabfec85171077248e3/packages/coding-agent/src/main.ts#L139-L175","documentation":"Error \"parsed.diagnostics.map((diagnostic) => diagnostic.message).join(\"\\n\")\" thrown in earendil-works/pi.","triggerScenarios":"Thrown at packages/coding-agent/src/main.ts:157 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4af9d21d3b4d664e4a29fcabfec85171077248e3","analyzedAt":"2026-08-24T13:07:14.692Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}