argoproj/argo-workflows · error
invalid mode
Error message
invalid mode
What it means
Modes.Add rejects a --auth-mode value that is not one of client, server, sso, or hybrid. It is a validation guard on the argo-server startup configuration; the offending string is whatever was passed to --auth-mode.
Source
Thrown at server/auth/mode.go:28
type Modes map[Mode]bool
type Mode string
const (
Client Mode = "client"
Server Mode = "server"
SSO Mode = "sso"
)
func (m Modes) Add(value string) error {
switch value {
case "client", "server", "sso":
m[Mode(value)] = true
case "hybrid":
m[Client] = true
m[Server] = true
default:
return errors.New("invalid mode")
}
return nil
}
func (m Modes) GetMode(authorisation string) (Mode, bool) {
if m[SSO] && strings.HasPrefix(authorisation, sso.Prefix) {
return SSO, true
}
if m[Client] && (strings.HasPrefix(authorisation, "Bearer ") || strings.HasPrefix(authorisation, "Basic ")) {
return Client, true
}
if m[Server] {
return Server, true
}
return "", false
}
View on GitHub (pinned to 35bff19146)
Solutions
- Set --auth-mode to one of client, server, sso, or hybrid
- For hybrid SSO+client setups use --auth-mode sso --auth-mode client
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/auth/mode.go:28 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03).
Data as JSON: /api/errors/e9d50193f9e902db.
Report an issue: GitHub.