plandex-ai/plandex · error

Error listing orgs:

Error message

Error listing orgs: 

What it means

HTTP 500 error body sent by ListOrgsHandler when db.GetAccessibleOrgsForUser fails to query which orgs the authenticated user can access. It signals a database or lookup failure on the server side after successful authentication; the underlying database error message is appended to the response returned to the client.

Source

Thrown at app/server/handlers/orgs.go:30

	shared "plandex-shared"

	"github.com/jmoiron/sqlx"
)

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

	auth := Authenticate(w, r, false)
	if auth == nil {
		return
	}

	orgs, err := db.GetAccessibleOrgsForUser(auth.User)

	if err != nil {
		log.Printf("Error listing orgs: %v\n", err)
		http.Error(w, "Error listing orgs: "+err.Error(), http.StatusInternalServerError)
		return
	}

	apiOrgs, apiErr := toApiOrgs(orgs)

	if apiErr != nil {
		log.Printf("Error converting orgs to api: %v\n", apiErr)
		writeApiError(w, *apiErr)
		return
	}

	bytes, err := json.Marshal(apiOrgs)

	if err != nil {
		log.Printf("Error marshalling response: %v\n", err)
		http.Error(w, "Error marshalling response: "+err.Error(), http.StatusInternalServerError)
		return
	}

View on GitHub (pinned to e2d772072e)

Solutions

  1. Read the wrapped error in server logs
  2. Check DB connectivity and org-membership query health
  3. Retry after the DB issue is addressed
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at app/server/handlers/orgs.go:30 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/c100a0647580ea42. Report an issue: GitHub.