{"record":{"id":"85cb6470d4c79cb3","repo":"paperclipai/paperclip","slug":"feedback-trace-bundle-traceid-not-found","errorCode":null,"errorMessage":"Feedback trace bundle ${traceId} not found","messagePattern":"Feedback trace bundle (.+?) not found","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/client/feedback.ts","lineNumber":265,"sourceCode":"export async function fetchCompanyFeedbackTraces(\n  ctx: ResolvedClientContext,\n  companyId: string,\n  opts: FeedbackFilterOptions,\n): Promise<FeedbackTrace[]> {\n  return (\n    (await ctx.api.get<FeedbackTrace[]>(\n      `${apiPath`/api/companies/${companyId}/feedback-traces`}${buildFeedbackTraceQuery(opts, true)}`,\n    )) ?? []\n  );\n}\n\nexport async function fetchFeedbackTraceBundle(\n  ctx: ResolvedClientContext,\n  traceId: string,\n): Promise<FeedbackTraceBundle> {\n  const bundle = await ctx.api.get<FeedbackTraceBundle>(apiPath`/api/feedback-traces/${traceId}/bundle`);\n  if (!bundle) {\n    throw new Error(`Feedback trace bundle ${traceId} not found`);\n  }\n  return bundle;\n}\n\nexport function summarizeFeedbackTraces(traces: FeedbackTrace[]): FeedbackSummary {\n  const statuses: Record<string, number> = {};\n  let thumbsUp = 0;\n  let thumbsDown = 0;\n  let withReason = 0;\n\n  for (const trace of traces) {\n    if (trace.vote === \"up\") thumbsUp += 1;\n    if (trace.vote === \"down\") thumbsDown += 1;\n    if (readFeedbackReason(trace)) withReason += 1;\n    statuses[trace.status] = (statuses[trace.status] ?? 0) + 1;\n  }\n\n  return {","sourceCodeStart":247,"sourceCodeEnd":283,"githubUrl":"https://github.com/paperclipai/paperclip/blob/67001ec6eb96ae601aa27bc91d9b2415d665334a/cli/src/commands/client/feedback.ts#L247-L283","documentation":"fetchFeedbackTraceBundle GETs /api/feedback-traces/{traceId}/bundle and throws when the client returns null, i.e., the trace id has no bundle.","triggerScenarios":"Requesting a bundle with a wrong, expired, or pruned trace id.","commonSituations":"Copy-paste typo in the trace id; trace aged out of retention; cross-instance id mismatch.","solutions":["List traces first (GET /api/companies/{id}/feedback-traces) and copy the exact id.","Confirm you are talking to the same instance that produced the trace.","Check retention settings if traces are being pruned."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"const traces = (await ctx.api.get(`/api/companies/${companyId}/feedback-traces`)) ?? [];\nconst exists = traces.some((t) => t.id === traceId);\nif (!exists) throw new Error(`Feedback trace ${traceId} not found`);","typeGuard":"const isFeedbackTraceBundle = (v: unknown): v is FeedbackTraceBundle =>\n  !!v && typeof v === 'object' && 'trace' in (v as any);","tryCatchPattern":"try {\n  const bundle = await ctx.api.get(`/api/feedback-traces/${traceId}/bundle`);\n  if (!bundle) throw new Error(`Feedback trace bundle ${traceId} not found`);\n} catch (err) {\n  // list traces, surface correct ids, then retry with a verified id\n}","preventionTips":["Copy trace ids from a fresh list call.","Confirm retention has not pruned the trace."],"tags":["cli","feedback","trace","not-found"],"backgroundTag":null,"analyzedSha":"67001ec6eb96ae601aa27bc91d9b2415d665334a","analyzedAt":"2026-08-12T12:05:45.408Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}