{"record":{"id":"abb0bf0f4ed49183","repo":"OpenNHP/opennhp","slug":"relay-server-d-fingerprint-s-loadbalance-q","errorCode":null,"errorMessage":"relay: server #%d (fingerprint %s) loadBalance %q is not one of: %q, %q, %q","messagePattern":"relay: server #(.+?) \\(fingerprint (.+?)\\) loadBalance %q is not one of: %q, %q, %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"endpoints/relay/config.go","lineNumber":276,"sourceCode":"\t\t\t\t\ti, j, addr, dup.server, dup.instance, fp)\n\t\t\t}\n\t\t\tseenAddr[addrKey] = addrOrigin{server: i, instance: j}\n\t\t\tif inst.Weight <= 0 {\n\t\t\t\tinst.Weight = 1\n\t\t\t}\n\t\t}\n\t\tswitch c.LoadBalance {\n\t\tcase \"\":\n\t\t\tc.LoadBalance = LBWeightedRandom\n\t\tcase LBRandom, LBWeightedRandom, LBRoundRobin:\n\t\t\t// known scheme, keep as-is\n\t\tdefault:\n\t\t\t// Typos like \"weighted_random\" or \"roundrobin\" are harmless in\n\t\t\t// phase 1 (the value is unused with a single instance) but\n\t\t\t// would silently degrade phase-2 load balancing to whatever\n\t\t\t// the default policy is. Reject at load time so the operator\n\t\t\t// hears about it now, not after a later upgrade.\n\t\t\treturn fmt.Errorf(\"relay: server #%d (fingerprint %s) loadBalance %q is not one of: %q, %q, %q\",\n\t\t\t\ti, fp, c.LoadBalance, LBRandom, LBWeightedRandom, LBRoundRobin)\n\t\t}\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":258,"sourceCodeEnd":283,"githubUrl":"https://github.com/OpenNHP/opennhp/blob/6e04ca5ff03222a699c24205cd4bf8fee9af7ffe/endpoints/relay/config.go#L258-L283","documentation":"Raised during config normalization (normalize) when a server entry's LoadBalance string is neither empty nor one of the accepted schemes. The check exists because a typo like 'weighted_random' or 'roundrobin' would otherwise silently fall back to the default policy once multi-instance load balancing is enabled, so the operator is told at load time instead.","triggerScenarios":"Thrown at endpoints/relay/config.go:276 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Correct the loadBalance value to one of the accepted scheme names","Copy the exact spelling from the error message, which enumerates the valid options"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6e04ca5ff03222a699c24205cd4bf8fee9af7ffe","analyzedAt":"2026-09-07T15:44:59.941Z","contentChangedAt":"2026-09-07T15:44:59.941Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}