{"record":{"id":"fd363628838a5a43","repo":"goharbor/harbor","slug":"failed-to-get-authorization-token-s","errorCode":null,"errorMessage":"failed to get authorization token: %s","messagePattern":"failed to get authorization token: (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/pkg/reg/adapter/aliacr/openapi.go","lineNumber":323,"sourceCode":"\t\t\tbreak\n\t\t}\n\t\tpage++\n\t}\n\treturn tags, nil\n}\n\n// GetAuthorizationToken returns the authorization token for repository.\nfunc (acree *acreeOpenapi) GetAuthorizationToken() (*authToken, error) {\n\ttokenRequest := cr_ee.CreateGetAuthorizationTokenRequest()\n\t// FIXME: use vpc endpoint if vpc is enabled\n\ttokenRequest.SetDomain(acree.domain)\n\ttokenRequest.InstanceId = acree.instanceID\n\ttokenResponse, err := acree.client.GetAuthorizationToken(tokenRequest)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif !tokenResponse.GetAuthorizationTokenIsSuccess {\n\t\treturn nil, fmt.Errorf(\"failed to get authorization token: %s\", tokenResponse.GetHttpContentString())\n\t}\n\treturn &authToken{\n\t\tuser:      tokenResponse.TempUsername,\n\t\tpassword:  tokenResponse.AuthorizationToken,\n\t\texpiresAt: time.Unix(tokenResponse.ExpireTime/1000, 0),\n\t}, nil\n}\n","sourceCodeStart":305,"sourceCodeEnd":331,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/pkg/reg/adapter/aliacr/openapi.go#L305-L331","documentation":"Error \"failed to get authorization token: %s\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/pkg/reg/adapter/aliacr/openapi.go:323 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"}