{"record":{"id":"1026918c83b8d1a9","repo":"goharbor/harbor","slug":"volcenginecr-fail-to-parse-expire-time-returned","errorCode":null,"errorMessage":"[VolcengineCR] fail to parse expire time returned: %v","messagePattern":"\\[VolcengineCR\\] fail to parse expire time returned: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/pkg/reg/adapter/volcenginecr/auth.go","lineNumber":75,"sourceCode":"\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 {\n\t\treturn false\n\t}\n\tif time.Now().After(*c.authCache.expireAt) {\n\t\treturn false\n\t}\n\treturn true\n}","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/pkg/reg/adapter/volcenginecr/auth.go#L57-L93","documentation":"Error \"[VolcengineCR] fail to parse expire time returned: %v\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/pkg/reg/adapter/volcenginecr/auth.go:75 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"}