{"record":{"id":"72b1e60c633c1f18","repo":"goharbor/harbor","slug":"volcenginecr-getauthorizationtoken-output-nil","errorCode":null,"errorMessage":"[VolcengineCR] GetAuthorizationToken output nil","messagePattern":"\\[VolcengineCR\\] GetAuthorizationToken output nil","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/pkg/reg/adapter/volcenginecr/auth.go","lineNumber":68,"sourceCode":"\t\tregistry:  registry,\n\t\tauthCache: &authCache{},\n\t}\n}\n\nfunc (c *volcCredential) Modify(r *http.Request) (err error) {\n\tif c.client == nil {\n\t\treturn errNilVolcCrClient\n\t}\n\tif !c.isCacheAuthValid() {\n\t\tlog.Debugf(\"update token %s\\n\", r.Host)\n\t\tauthResp, err := c.client.GetAuthorizationToken(&cr.GetAuthorizationTokenInput{\n\t\t\tRegistry: &c.registry,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif authResp == nil || authResp.Username == nil || authResp.Token == nil || authResp.ExpireTime == nil {\n\t\t\treturn errors.New(\"[VolcengineCR] GetAuthorizationToken output nil\")\n\t\t}\n\t\tc.authCache.username = *authResp.Username\n\t\tc.authCache.password = *authResp.Token\n\t\texpireTime, err := time.Parse(time.RFC3339, *authResp.ExpireTime)\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"fail to parse expire time returned: %v\", err)\n\t\t\treturn fmt.Errorf(\"[VolcengineCR] fail to parse expire time returned: %v\", err)\n\t\t}\n\t\tc.authCache.expireAt = &expireTime\n\t} else {\n\t\tlog.Debug(\"token cached\")\n\t}\n\tr.SetBasicAuth(c.authCache.username, c.authCache.password)\n\treturn nil\n}\n\nfunc (c *volcCredential) isCacheAuthValid() bool {\n\tif c.authCache == nil || c.authCache.expireAt == nil {","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/pkg/reg/adapter/volcenginecr/auth.go#L50-L86","documentation":"Error \"[VolcengineCR] GetAuthorizationToken output nil\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/pkg/reg/adapter/volcenginecr/auth.go:68 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":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}