Merge pull request #17187 from swordqiu/hotfix/qj-apigateway-endpoint-error-empty

fix: apigateway endpoint empty error
This commit is contained in:
Zexi Li
2023-05-30 17:40:44 +08:00
committed by GitHub
+1 -1
View File
@@ -179,7 +179,7 @@ func (this *ClientSession) getApigatewayServiceURLs(service, region, zone, endpo
prefix := this.client.authUrl
lastSlashPos := strings.LastIndex(prefix, "/api/s/identity")
if lastSlashPos <= 0 {
return nil, errors.Wrapf(err, "invalue auth_url %s", prefix)
return nil, errors.Wrapf(errors.ErrInvalidFormat, "invalue auth_url %s, should be url of apigateway endpoint, e.g. https://<apigateway-host>/api/s/identity/v3", prefix)
}
prefix = httputils.JoinPath(prefix[:lastSlashPos], "api/s", service)
if len(region) > 0 {