Skip to content
This repository was archived by the owner on Feb 12, 2025. It is now read-only.

Commit bad3b7c

Browse files
authored
Wrap error when registering RP fails (#691)
The allows callers to get at the underlying error.
1 parent a91292d commit bad3b7c

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

autorest/azure/rp.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func DoRetryWithRegistration(client autorest.Client) autorest.SendDecorator {
6464
if re.ServiceError != nil && re.ServiceError.Code == "MissingSubscriptionRegistration" {
6565
regErr := register(client, r, re)
6666
if regErr != nil {
67-
return resp, fmt.Errorf("failed auto registering Resource Provider: %s. Original error: %s", regErr, err)
67+
return resp, fmt.Errorf("failed auto registering Resource Provider: %s. Original error: %w", regErr, err)
6868
}
6969
}
7070
}

autorest/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.15
55
require (
66
github.com/Azure/go-autorest v14.2.0+incompatible
77
github.com/Azure/go-autorest/autorest/adal v0.9.18
8-
github.com/Azure/go-autorest/autorest/mocks v0.4.1
8+
github.com/Azure/go-autorest/autorest/mocks v0.4.2
99
github.com/Azure/go-autorest/logger v0.2.1
1010
github.com/Azure/go-autorest/tracing v0.6.0
1111
github.com/golang-jwt/jwt/v4 v4.2.0 // indirect

autorest/go.sum

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ github.com/Azure/go-autorest/autorest/adal v0.9.18 h1:kLnPsRjzZZUF3K5REu/Kc+qMQr
44
github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ=
55
github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw=
66
github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74=
7-
github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk=
87
github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
8+
github.com/Azure/go-autorest/autorest/mocks v0.4.2 h1:PGN4EDXnuQbojHbU0UWoNvmu9AGVwYHG9/fkDYhtAfw=
9+
github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU=
910
github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg=
1011
github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
1112
github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo=

0 commit comments

Comments
 (0)