Skip to content

Commit

Permalink
Add another error code to the list of unregistered RP errors (#21606)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhendrixMSFT authored Sep 21, 2023
1 parent 9519990 commit 8db55a4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sdk/azcore/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

### Bugs Fixed

* Fixed an issue that could cause some ARM RPs to not be automatically registered.

### Other Changes

## 1.8.0-beta.3 (2023-09-07)
Expand Down
1 change: 1 addition & 0 deletions sdk/azcore/arm/runtime/policy_register_rp.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ var unregisteredRPCodes = []string{
"MissingSubscriptionRegistration",
"MissingRegistrationForResourceProvider",
"Subscription Not Registered",
"SubscriptionNotRegistered",
}

func isUnregisteredRPCode(errorCode string) bool {
Expand Down
1 change: 1 addition & 0 deletions sdk/azcore/arm/runtime/policy_register_rp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ func TestRPRegistrationPolicyEnvironmentsInSubExceeded(t *testing.T) {

func TestIsUnregisteredRPCode(t *testing.T) {
require.True(t, isUnregisteredRPCode("Subscription Not Registered"))
require.True(t, isUnregisteredRPCode("SubscriptionNotRegistered"))
require.False(t, isUnregisteredRPCode("Your subscription isn't registered"))
}

Expand Down

0 comments on commit 8db55a4

Please sign in to comment.