{"record":{"id":"97ace437eba03efb","repo":"juanfont/headscale","slug":"unmarshalling-users-w","errorCode":null,"errorMessage":"unmarshalling users: %w","messagePattern":"unmarshalling users: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/headscale/cli/mockoidc.go","lineNumber":89,"sourceCode":"\tif accessTTLOverride != \"\" {\n\t\tnewTTL, err := time.ParseDuration(accessTTLOverride)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\taccessTTL = newTTL\n\t}\n\n\tuserStr := os.Getenv(\"MOCKOIDC_USERS\")\n\tif userStr == \"\" {\n\t\treturn errMockOidcUsersNotDefined\n\t}\n\n\tvar users []mockoidc.MockUser\n\n\terr := json.Unmarshal([]byte(userStr), &users)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unmarshalling users: %w\", err)\n\t}\n\n\tlog.Info().Interface(zf.Users, users).Msg(\"loading users from JSON\")\n\n\tlog.Info().Msgf(\"access token TTL: %s\", accessTTL)\n\n\tport, err := strconv.Atoi(portStr)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tmock, err := getMockOIDC(clientID, clientSecret, users)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tlistener, err := new(net.ListenConfig).Listen(context.Background(), \"tcp\", fmt.Sprintf(\"%s:%d\", addrStr, port))\n\tif err != nil {","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/juanfont/headscale/blob/565fd254d06c4c7f9a8cad1714a43445c79ba420/cmd/headscale/cli/mockoidc.go#L71-L107","documentation":"Error \"unmarshalling users: %w\" thrown in juanfont/headscale.","triggerScenarios":"Thrown at cmd/headscale/cli/mockoidc.go:89 when the library encounters an invalid state.","commonSituations":"The JSON produced by the mock OIDC server's user endpoint could not be unmarshalled. Check the MOCKOIDC users payload is valid JSON matching the expected claims structure.","solutions":["Inspect the wrapped error for the underlying cause and correct the failing condition (unmarshalling users); retry the operation after fixing the input, configuration, or environment."],"exampleFix":"Inspect the wrapped error for the underlying cause and correct the failing condition (unmarshalling users); retry the operation after fixing the input, configuration, or environment.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"565fd254d06c4c7f9a8cad1714a43445c79ba420","analyzedAt":"2026-08-15T13:12:30.133Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}