plandex-ai/plandex · error · http

Error getting settings

Error message

Error getting settings

What it means

GetSettingsHandler loads the server/plan settings inside a transaction-like callback; when that operation returns an error the handler logs it and returns a generic HTTP 500 'Error getting settings'. It means the server could not read the stored settings, not that the request was malformed.

Source

Thrown at app/server/handlers/settings.go:63

		Branch:   branch,
		Reason:   "get settings",
		Scope:    db.LockScopeRead,
		Ctx:      ctx,
		CancelFn: cancel,
	}, func(repo *db.GitRepo) error {
		res, err := db.GetPlanSettings(plan)
		if err != nil {
			return err
		}

		settings = res

		return nil
	})

	if err != nil {
		log.Println("Error getting settings: ", err)
		http.Error(w, "Error getting settings", http.StatusInternalServerError)
		return
	}

	bytes, err := json.Marshal(settings)

	if err != nil {
		log.Println("Error marshalling settings: ", err)
		http.Error(w, "Error marshalling settings", http.StatusInternalServerError)
		return
	}

	log.Println("GetSettingsHandler processed successfully")

	w.Write(bytes)
}

func UpdateSettingsHandler(w http.ResponseWriter, r *http.Request) {
	log.Println("Received request for UpdateSettingsHandler")

View on GitHub (pinned to e2d772072e)

Solutions

  1. Check the server log for the underlying error logged next to this message
  2. Inspect the stored settings data for corruption and restore/repair it
  3. Verify storage backend connectivity and read permissions
  4. Restore settings from a known-good backup if parse errors persist
Defensive patterns

Strategy: retry

Try / catch

resp, err := client.GetSettings(ctx)
if err != nil {
    if strings.Contains(err.Error(), "Error getting settings") {
        // server failed to load settings; retry or fall back to defaults
        return defaultSettings, nil
    }
    return err
}

Prevention

When it happens

Trigger: The settings-loading callback returns an error: settings file/git storage read failure, JSON parse failure of stored settings, DB/storage backend unavailable, or permission error reading the settings store.

Common situations: Corrupted or non-JSON settings blob in storage; missing read permissions on the settings store; storage backend (git repo/DB) unavailable after a restart; partial write from a previous crash.

Related errors


AI-assisted analysis of plandex-ai/plandex@e2d772072e (2026-09-05). Data as JSON: /api/errors/ac6b7f066de19133. Report an issue: GitHub.