{"record":{"id":"b17994e181bccfe0","repo":"plandex-ai/plandex","slug":"v","errorCode":null,"errorMessage":"%v","messagePattern":"%v","errorType":"http","errorClass":null,"httpStatus":500,"severity":"error","filePath":"app/server/handlers/context_helper.go","lineNumber":208,"sourceCode":"\n\t\t\t\tname, err := model.GenNoteName(r.Context(), auth, plan, settings, orgUserConfig, clients, authVars, context.Body, context.SessionId)\n\n\t\t\t\tif err != nil {\n\t\t\t\t\terrCh <- fmt.Errorf(\"error generating name for note: %v\", err)\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tcontext.Name = name\n\t\t\t\terrCh <- nil\n\t\t\t}(context)\n\t\t}\n\t}\n\tif num > 0 {\n\t\tfor i := 0; i < num; i++ {\n\t\t\terr := <-errCh\n\t\t\tif err != nil {\n\t\t\t\tlog.Printf(\"Error: %v\\n\", err)\n\t\t\t\thttp.Error(w, err.Error(), http.StatusInternalServerError)\n\t\t\t\treturn nil, nil\n\t\t\t}\n\t\t}\n\t}\n\n\tctx, cancel := context.WithCancel(r.Context())\n\n\tvar loadRes *shared.LoadContextResponse\n\tvar dbContexts []*db.Context\n\n\terr = db.ExecRepoOperation(db.ExecRepoOperationParams{\n\t\tOrgId:          auth.OrgId,\n\t\tUserId:         auth.User.Id,\n\t\tPlanId:         plan.Id,\n\t\tBranch:         branchName,\n\t\tReason:         \"load contexts\",\n\t\tScope:          db.LockScopeWrite,\n\t\tCtx:            ctx,","sourceCodeStart":190,"sourceCodeEnd":226,"githubUrl":"https://github.com/plandex-ai/plandex/blob/e2d772072efadbe41d2946d97d79be55532dbab5/app/server/handlers/context_helper.go#L190-L226","documentation":"Piped-data and note contexts get an LLM-generated name in goroutines whose results are collected over errCh. Any error from GenPipedDataName/GenNoteName — including a recovered panic with a stack trace — is surfaced verbatim as an HTTP 500 with the message being just err.Error() (hence the generic \"%v\").","triggerScenarios":"GenPipedDataName or GenNoteName fails (LLM API error, auth/invalid API key, rate limit, timeout, cancelled request) or panics inside the naming goroutine while loading piped data or notes.","commonSituations":"Expired/invalid LLM API keys; provider outages or 429s; very long piped content blowing the naming model's context; nil-pointer panic in a custom model integration.","solutions":["Read the server log line starting with 'Error:' for the full underlying cause (API error or panic stack)","Verify LLM API keys/org auth vars configured for the plan are valid and have quota","Retry the load after provider recovery if it was a transient 5xx/429","Trim oversized piped content; report the panic to Plandex if it's a framework bug"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if len(pipedBody) > 100_000 {\n    return fmt.Errorf(\"piped content too large for auto-naming; provide a name explicitly\")\n}","typeGuard":null,"tryCatchPattern":"resp, err := doLoad(req)\nif err != nil && strings.HasPrefix(err.Error(), \"error generating name for\") {\n    // LLM naming call failed: check API keys/quota, retry with backoff\n    return retryWithBackoff(doLoad)\n}","preventionTips":["Keep LLM API keys and auth vars valid and funded","Trim piped content; supply explicit names to skip LLM naming","Watch provider status for 429/5xx storms before bulk loads","Report panics with the server's stack trace to maintainers"],"tags":["http-500","llm-api","goroutine","panic","piped-data","plandex"],"backgroundTag":"llm-api-call-failed","analyzedSha":"e2d772072efadbe41d2946d97d79be55532dbab5","analyzedAt":"2026-09-05T20:56:53.631Z","contentChangedAt":"2026-09-05T20:56:53.631Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}