plandex-ai/plandex · error
Failed to fetch model packs:
Error message
Failed to fetch model packs:
What it means
HTTP 500 error body sent by ListModelPacksHandler when db.ListModelPacks fails to load the model packs for the authenticated user's org from the database. It indicates a server-side storage/query failure (not a client problem) — the handler has already passed authentication and minimum client version checks, and the raw database error string is appended to the response.
Source
Thrown at app/server/handlers/models.go:508
http.Error(w, "Use POST /custom_models instead to update model packs", http.StatusBadRequest)
}
func ListModelPacksHandler(w http.ResponseWriter, r *http.Request) {
log.Println("Received request for ListModelPacksHandler")
auth := Authenticate(w, r, true)
if auth == nil {
return
}
if !requireMinClientVersion(w, r, CustomModelsMinClientVersion) {
return
}
sets, err := db.ListModelPacks(auth.OrgId)
if err != nil {
log.Printf("Error fetching model packs: %v\n", err)
http.Error(w, "Failed to fetch model packs: "+err.Error(), http.StatusInternalServerError)
return
}
var apiPacks []*shared.ModelPack
for _, mp := range sets {
apiPacks = append(apiPacks, mp.ToApi())
}
json.NewEncoder(w).Encode(apiPacks)
log.Println("Successfully fetched model packs")
}
View on GitHub (pinned to e2d772072e)
Solutions
- Check server logs for the wrapped db error
- Verify DB connectivity and the model_packs schema
- Retry the request once the DB issue is resolved
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at app/server/handlers/models.go:508 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of plandex-ai/plandex@e2d772072e (2026-09-05).
Data as JSON: /api/errors/1290ebf960e97ceb.
Report an issue: GitHub.