vxcontrol/pentagi · error
unauthorized: invalid user: %v
Error message
unauthorized: invalid user: %v
What it means
Error "unauthorized: invalid user: %v" thrown in vxcontrol/pentagi.
Source
Thrown at backend/pkg/server/services/graphql.go:104
})
srv.SetQueryCache(lru.New[*ast.QueryDocument](1000))
srv.Use(extension.Introspection{})
srv.Use(extension.AutomaticPersistedQuery{
Cache: lru.New[string](100),
})
srv.Use(extension.FixedComplexityLimit(20000))
ov := newOriginValidator(origins)
// Add transport to support GraphQL subscriptions
srv.AddTransport(&transport.Websocket{
KeepAlivePingInterval: 10 * time.Second,
InitFunc: func(ctx context.Context, initPayload transport.InitPayload) (context.Context, *transport.InitPayload, error) {
uid, err := graph.GetUserID(ctx)
if err != nil {
return nil, nil, fmt.Errorf("unauthorized: invalid user: %v", err)
}
logger.WithField("uid", uid).Info("graphql websocket upgrade")
return ctx, &initPayload, nil
},
Upgrader: websocket.Upgrader{
CheckOrigin: func(r *http.Request) (allowed bool) {
return ov.validateOrigin(r.Header.Get("Origin"), r.Host)
},
EnableCompression: true,
},
})
return &GraphqlService{
srv: srv,
play: playground.Handler("GraphQL", baseURL+"/graphql"),
}
}View on GitHub (pinned to ea665308ba)
When it happens
Trigger: Thrown at backend/pkg/server/services/graphql.go:104 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
AI-assisted analysis of vxcontrol/pentagi@ea665308ba (2026-09-01).
Data as JSON: /api/errors/4bed1505f1dac9a5.
Report an issue: GitHub.