{"record":{"id":"a9e6b11e9ff2d412","repo":"paperclipai/paperclip","slug":"deletion-requires-confirm-secretid-matching-th","errorCode":null,"errorMessage":"Deletion requires --confirm <secretId> matching the secret ID.","messagePattern":"Deletion requires --confirm <secretId> matching the secret ID\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/src/commands/client/secrets.ts","lineNumber":545,"sourceCode":"          printOutput(await ctx.api.get(apiPath`/api/secrets/${secretId}/access-events`), { json: ctx.json });\n        } catch (err) {\n          handleCommandError(err);\n        }\n      }),\n  );\n\n  addCommonClientOptions(\n    secrets\n      .command(\"delete\")\n      .description(\"Delete a secret\")\n      .argument(\"<secretId>\", \"Secret ID\")\n      .option(\"--yes\", \"Required safety flag to confirm destructive action\", false)\n      .option(\"--confirm <secretId>\", \"Repeat the secret ID to confirm deletion\")\n      .action(async (secretId: string, opts: SecretDeleteOptions) => {\n        try {\n          if (!opts.yes) throw new Error(\"Deletion requires --yes.\");\n          if (opts.confirm !== secretId) {\n            throw new Error(\"Deletion requires --confirm <secretId> matching the secret ID.\");\n          }\n          const ctx = resolveCommandContext(opts);\n          printOutput(await ctx.api.delete(apiPath`/api/secrets/${secretId}`), { json: ctx.json });\n        } catch (err) {\n          handleCommandError(err);\n        }\n      }),\n  );\n\n  addCommonClientOptions(\n    secrets\n      .command(\"doctor\")\n      .description(\"Run secret provider health checks through the Paperclip API\")\n      .requiredOption(\"-C, --company-id <id>\", \"Company ID\")\n      .action(async (opts: SecretDoctorOptions) => {\n        try {\n          const ctx = resolveCommandContext(opts, { requireCompany: true });\n          const health = await ctx.api.get<SecretProviderHealthResponse>(","sourceCodeStart":527,"sourceCodeEnd":563,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/cli/src/commands/client/secrets.ts#L527-L563","documentation":"--yes was given but --confirm is empty or does not equal the secret id argument, so the typed-confirmation guard for secret deletion rejects the request.","triggerScenarios":"Thrown at cli/src/commands/client/secrets.ts:545 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass --confirm with the exact secret ID being deleted."],"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"}