{"record":{"id":"4b8a9adb7bd065b4","repo":"vxcontrol/pentagi","slug":"error-generating-token-id-w","errorCode":null,"errorMessage":"error generating token ID: %w","messagePattern":"error generating token ID: %w","errorType":"exception","errorClass":null,"httpStatus":500,"severity":"error","filePath":"backend/pkg/server/auth/api_token_id.go","lineNumber":22,"sourceCode":"\t\"crypto/rand\"\n\t\"fmt\"\n\t\"math/big\"\n)\n\nconst (\n\tBase62Chars   = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\"\n\tTokenIDLength = 10\n)\n\n// GenerateTokenID generates a random base62 string of specified length\nfunc GenerateTokenID() (string, error) {\n\tb := make([]byte, TokenIDLength)\n\tmaxIdx := big.NewInt(int64(len(Base62Chars)))\n\n\tfor i := range b {\n\t\tidx, err := rand.Int(rand.Reader, maxIdx)\n\t\tif err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"error generating token ID: %w\", err)\n\t\t}\n\t\tb[i] = Base62Chars[idx.Int64()]\n\t}\n\n\treturn string(b), nil\n}\n","sourceCodeStart":4,"sourceCodeEnd":29,"githubUrl":"https://github.com/vxcontrol/pentagi/blob/ea665308baaff015b226f308438a68d929d0f29b/backend/pkg/server/auth/api_token_id.go#L4-L29","documentation":"Error \"error generating token ID: %w\" thrown in vxcontrol/pentagi.","triggerScenarios":"Thrown at backend/pkg/server/auth/api_token_id.go:22 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ea665308baaff015b226f308438a68d929d0f29b","analyzedAt":"2026-09-01T14:16:31.421Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}