plandex-ai/plandex · error
Error reading request body:
Error message
Error reading request body:
What it means
CreateOrgHandler: io.ReadAll(r.Body) fails while reading the create-org request payload, producing a 500. Client disconnected mid-body or a body size/transport error — the request bytes never arrived complete.
Source
Thrown at app/server/handlers/orgs.go:76
if os.Getenv("IS_CLOUD") != "" {
writeApiError(w, shared.ApiError{
Type: shared.ApiErrorTypeOther,
Status: http.StatusForbidden,
Msg: "Plandex Cloud orgs can only be created by starting a trial",
})
return
}
auth := Authenticate(w, r, false)
if auth == nil {
return
}
// read the request body
body, err := io.ReadAll(r.Body)
if err != nil {
log.Printf("Error reading request body: %v\n", err)
http.Error(w, "Error reading request body: "+err.Error(), http.StatusInternalServerError)
return
}
var req shared.CreateOrgRequest
err = json.Unmarshal(body, &req)
if err != nil {
log.Printf("Error unmarshalling request: %v\n", err)
http.Error(w, "Error unmarshalling request: "+err.Error(), http.StatusInternalServerError)
return
}
var apiErr *shared.ApiError
var org *db.Org
err = db.WithTx(r.Context(), "create org", func(tx *sqlx.Tx) error {
var err error
var domain *string
if req.AutoAddDomainUsers {
if shared.IsEmailServiceDomain(auth.User.Domain) {View on GitHub (pinned to e2d772072e)
Solutions
- Retry the request from the client
- Check for client disconnects or proxies truncating bodies
- Ensure the client sends a correct Content-Length
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at app/server/handlers/orgs.go:76 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/a0e51df2333b8c04.
Report an issue: GitHub.