From 4e8086054953ccdd3c90af62b9a761aebe30de2f Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 11 May 2023 07:14:03 +0000 Subject: [PATCH 1/2] Update Generator Version 3.0.0-alpha.20230511.1 --- eng/Packages.Data.props | 2 +- eng/emitter-package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 0cf2568b4241d..a3e1f02df169d 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -167,7 +167,7 @@ All should have PrivateAssets="All" set so they don't become package dependencies --> - + diff --git a/eng/emitter-package.json b/eng/emitter-package.json index 78032800c00c8..ebd254b6b44c5 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,6 +1,6 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20230508.2" + "@azure-tools/typespec-csharp": "0.2.0-alpha.20230511.1" } } From 8e7489737f34bd4cb82d92ce16234e669428a2fa Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 11 May 2023 07:30:07 +0000 Subject: [PATCH 2/2] Update SDK codes --- .../Generated/ApplicationsRestOperations.cs | 64 ++++++++-------- .../DeletedApplicationsRestOperations.cs | 20 ++--- .../src/Generated/DomainsRestOperations.cs | 8 +- .../src/Generated/GroupsRestOperations.cs | 68 ++++++++--------- .../OAuth2PermissionGrantRestOperations.cs | 20 ++--- .../src/Generated/ObjectsRestOperations.cs | 12 +-- .../ServicePrincipalsRestOperations.cs | 76 +++++++++---------- .../Generated/SignedInUserRestOperations.cs | 16 ++-- .../src/Generated/UsersRestOperations.cs | 32 ++++---- 9 files changed, 158 insertions(+), 158 deletions(-) diff --git a/sdk/testcommon/Azure.Graph.Rbac/src/Generated/ApplicationsRestOperations.cs b/sdk/testcommon/Azure.Graph.Rbac/src/Generated/ApplicationsRestOperations.cs index ad018ba5455d7..32fe759eab123 100644 --- a/sdk/testcommon/Azure.Graph.Rbac/src/Generated/ApplicationsRestOperations.cs +++ b/sdk/testcommon/Azure.Graph.Rbac/src/Generated/ApplicationsRestOperations.cs @@ -93,7 +93,7 @@ public async Task> CreateAsync(ApplicationCreateParameters return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -120,7 +120,7 @@ public Response Create(ApplicationCreateParameters parameters, Canc return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -161,7 +161,7 @@ public async Task> ListAsync(string filter = nul return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -182,7 +182,7 @@ public Response List(string filter = null, CancellationTo return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -221,7 +221,7 @@ public async Task DeleteAsync(string applicationObjectId, Cancellation case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -243,7 +243,7 @@ public Response Delete(string applicationObjectId, CancellationToken cancellatio case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -287,7 +287,7 @@ public async Task> GetAsync(string applicationObjectId, Ca return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -314,7 +314,7 @@ public Response Get(string applicationObjectId, CancellationToken c return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -362,7 +362,7 @@ public async Task PatchAsync(string applicationObjectId, ApplicationUp case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -389,7 +389,7 @@ public Response Patch(string applicationObjectId, ApplicationUpdateParameters pa case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -434,7 +434,7 @@ public async Task> ListOwnersAsync(string ap return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -461,7 +461,7 @@ public Response ListOwners(string applicationObjectId return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -510,7 +510,7 @@ public async Task AddOwnerAsync(string applicationObjectId, AddOwnerPa case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -537,7 +537,7 @@ public Response AddOwner(string applicationObjectId, AddOwnerParameters paramete case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -583,7 +583,7 @@ public async Task RemoveOwnerAsync(string applicationObjectId, string case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -610,7 +610,7 @@ public Response RemoveOwner(string applicationObjectId, string ownerObjectId, Ca case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -655,7 +655,7 @@ public async Task> ListKeyCredentialsAsync(str return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -682,7 +682,7 @@ public Response ListKeyCredentials(string applicationOb return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -731,7 +731,7 @@ public async Task UpdateKeyCredentialsAsync(string applicationObjectId case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -758,7 +758,7 @@ public Response UpdateKeyCredentials(string applicationObjectId, KeyCredentialsU case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -803,7 +803,7 @@ public async Task> ListPasswordCredential return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -830,7 +830,7 @@ public Response ListPasswordCredentials(string app return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -879,7 +879,7 @@ public async Task UpdatePasswordCredentialsAsync(string applicationObj case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -906,7 +906,7 @@ public Response UpdatePasswordCredentials(string applicationObjectId, PasswordCr case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -951,7 +951,7 @@ public async Task> GetServicePrincipalsId return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -978,7 +978,7 @@ public Response GetServicePrincipalsIdByAppId(stri return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -1022,7 +1022,7 @@ public async Task> ListNextAsync(string nextLink return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -1049,7 +1049,7 @@ public Response ListNext(string nextLink, CancellationTok return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -1094,7 +1094,7 @@ public async Task> ListOwnersNextPageAsync(s return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -1126,7 +1126,7 @@ public Response ListOwnersNextPage(string nextLink, s return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -1166,7 +1166,7 @@ public async Task> ListNextNextPageAsync(string return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -1193,7 +1193,7 @@ public Response ListNextNextPage(string nextLink, Cancell return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } } diff --git a/sdk/testcommon/Azure.Graph.Rbac/src/Generated/DeletedApplicationsRestOperations.cs b/sdk/testcommon/Azure.Graph.Rbac/src/Generated/DeletedApplicationsRestOperations.cs index c4b74db85f6bf..0d70247929548 100644 --- a/sdk/testcommon/Azure.Graph.Rbac/src/Generated/DeletedApplicationsRestOperations.cs +++ b/sdk/testcommon/Azure.Graph.Rbac/src/Generated/DeletedApplicationsRestOperations.cs @@ -91,7 +91,7 @@ public async Task> RestoreAsync(string objectId, Cancellat return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -118,7 +118,7 @@ public Response Restore(string objectId, CancellationToken cancella return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -159,7 +159,7 @@ public async Task> ListAsync(string filter = nul return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -180,7 +180,7 @@ public Response List(string filter = null, CancellationTo return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -219,7 +219,7 @@ public async Task HardDeleteAsync(string applicationObjectId, Cancella case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -241,7 +241,7 @@ public Response HardDelete(string applicationObjectId, CancellationToken cancell case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -285,7 +285,7 @@ public async Task> ListNextAsync(string nextLink return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -312,7 +312,7 @@ public Response ListNext(string nextLink, CancellationTok return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -352,7 +352,7 @@ public async Task> ListNextNextPageAsync(string return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -379,7 +379,7 @@ public Response ListNextNextPage(string nextLink, Cancell return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } } diff --git a/sdk/testcommon/Azure.Graph.Rbac/src/Generated/DomainsRestOperations.cs b/sdk/testcommon/Azure.Graph.Rbac/src/Generated/DomainsRestOperations.cs index 9b6036aaa0347..d37e3a61fb1eb 100644 --- a/sdk/testcommon/Azure.Graph.Rbac/src/Generated/DomainsRestOperations.cs +++ b/sdk/testcommon/Azure.Graph.Rbac/src/Generated/DomainsRestOperations.cs @@ -87,7 +87,7 @@ public async Task> ListAsync(string filter = null, Ca return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -108,7 +108,7 @@ public Response List(string filter = null, CancellationToken c return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -152,7 +152,7 @@ public async Task> GetAsync(string domainName, CancellationToke return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -179,7 +179,7 @@ public Response Get(string domainName, CancellationToken cancellationTok return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } } diff --git a/sdk/testcommon/Azure.Graph.Rbac/src/Generated/GroupsRestOperations.cs b/sdk/testcommon/Azure.Graph.Rbac/src/Generated/GroupsRestOperations.cs index 4fbcaf06e9cf0..007133f29e50f 100644 --- a/sdk/testcommon/Azure.Graph.Rbac/src/Generated/GroupsRestOperations.cs +++ b/sdk/testcommon/Azure.Graph.Rbac/src/Generated/GroupsRestOperations.cs @@ -93,7 +93,7 @@ public async Task> IsMemberOfAsync(CheckGro return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -120,7 +120,7 @@ public Response IsMemberOf(CheckGroupMembershipParam return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -166,7 +166,7 @@ public async Task RemoveMemberAsync(string groupObjectId, string membe case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -193,7 +193,7 @@ public Response RemoveMember(string groupObjectId, string memberObjectId, Cancel case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -242,7 +242,7 @@ public async Task AddMemberAsync(string groupObjectId, GroupAddMemberP case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -269,7 +269,7 @@ public Response AddMember(string groupObjectId, GroupAddMemberParameters paramet case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -316,7 +316,7 @@ public async Task> CreateAsync(GroupCreateParameters parameter return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -343,7 +343,7 @@ public Response Create(GroupCreateParameters parameters, CancellationTo return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -384,7 +384,7 @@ public async Task> ListAsync(string filter = null, Can return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -405,7 +405,7 @@ public Response List(string filter = null, CancellationToken ca return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -450,7 +450,7 @@ public async Task> GetGroupMembersAsync(stri return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -477,7 +477,7 @@ public Response GetGroupMembers(string objectId, Canc return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -521,7 +521,7 @@ public async Task> GetAsync(string objectId, CancellationToken return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -548,7 +548,7 @@ public Response Get(string objectId, CancellationToken cancellationToke return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -587,7 +587,7 @@ public async Task DeleteAsync(string objectId, CancellationToken cance case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -609,7 +609,7 @@ public Response Delete(string objectId, CancellationToken cancellationToken = de case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -663,7 +663,7 @@ public async Task> GetMemberGroupsAsync(str return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -695,7 +695,7 @@ public Response GetMemberGroups(string objectId, Gro return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -740,7 +740,7 @@ public async Task> ListOwnersAsync(string ob return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -767,7 +767,7 @@ public Response ListOwners(string objectId, Cancellat return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -816,7 +816,7 @@ public async Task AddOwnerAsync(string objectId, AddOwnerParameters pa case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -843,7 +843,7 @@ public Response AddOwner(string objectId, AddOwnerParameters parameters, Cancell case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -889,7 +889,7 @@ public async Task RemoveOwnerAsync(string objectId, string ownerObject case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -916,7 +916,7 @@ public Response RemoveOwner(string objectId, string ownerObjectId, CancellationT case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -960,7 +960,7 @@ public async Task> ListNextAsync(string nextLink, Canc return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -987,7 +987,7 @@ public Response ListNext(string nextLink, CancellationToken can return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -1031,7 +1031,7 @@ public async Task> GetGroupMembersNextAsync( return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -1058,7 +1058,7 @@ public Response GetGroupMembersNext(string nextLink, return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -1103,7 +1103,7 @@ public async Task> ListOwnersNextPageAsync(s return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -1135,7 +1135,7 @@ public Response ListOwnersNextPage(string nextLink, s return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -1175,7 +1175,7 @@ public async Task> ListNextNextPageAsync(string nextLi return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -1202,7 +1202,7 @@ public Response ListNextNextPage(string nextLink, CancellationT return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -1242,7 +1242,7 @@ public async Task> GetGroupMembersNextNextPa return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -1269,7 +1269,7 @@ public Response GetGroupMembersNextNextPage(string ne return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } } diff --git a/sdk/testcommon/Azure.Graph.Rbac/src/Generated/OAuth2PermissionGrantRestOperations.cs b/sdk/testcommon/Azure.Graph.Rbac/src/Generated/OAuth2PermissionGrantRestOperations.cs index 6ad72bacc6d6d..123247cacc411 100644 --- a/sdk/testcommon/Azure.Graph.Rbac/src/Generated/OAuth2PermissionGrantRestOperations.cs +++ b/sdk/testcommon/Azure.Graph.Rbac/src/Generated/OAuth2PermissionGrantRestOperations.cs @@ -87,7 +87,7 @@ public async Task> ListAsync(string fi return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -108,7 +108,7 @@ public Response List(string filter = null, Canc return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -152,7 +152,7 @@ public async Task> CreateAsync(OAuth2PermissionG return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -173,7 +173,7 @@ public Response Create(OAuth2PermissionGrant body = null, return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -212,7 +212,7 @@ public async Task DeleteAsync(string objectId, CancellationToken cance case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -234,7 +234,7 @@ public Response Delete(string objectId, CancellationToken cancellationToken = de case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -278,7 +278,7 @@ public async Task> ListNextAsync(strin return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -305,7 +305,7 @@ public Response ListNext(string nextLink, Cance return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -345,7 +345,7 @@ public async Task> ListNextNextPageAsy return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -372,7 +372,7 @@ public Response ListNextNextPage(string nextLin return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } } diff --git a/sdk/testcommon/Azure.Graph.Rbac/src/Generated/ObjectsRestOperations.cs b/sdk/testcommon/Azure.Graph.Rbac/src/Generated/ObjectsRestOperations.cs index 793df989097a1..bb5d371ca452a 100644 --- a/sdk/testcommon/Azure.Graph.Rbac/src/Generated/ObjectsRestOperations.cs +++ b/sdk/testcommon/Azure.Graph.Rbac/src/Generated/ObjectsRestOperations.cs @@ -93,7 +93,7 @@ public async Task> GetObjectsByObjectIdsAsyn return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -120,7 +120,7 @@ public Response GetObjectsByObjectIds(GetObjectsParam return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -164,7 +164,7 @@ public async Task> GetObjectsByObjectIdsNext return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -191,7 +191,7 @@ public Response GetObjectsByObjectIdsNext(string next return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -231,7 +231,7 @@ public async Task> GetObjectsByObjectIdsNext return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -258,7 +258,7 @@ public Response GetObjectsByObjectIdsNextNextPage(str return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } } diff --git a/sdk/testcommon/Azure.Graph.Rbac/src/Generated/ServicePrincipalsRestOperations.cs b/sdk/testcommon/Azure.Graph.Rbac/src/Generated/ServicePrincipalsRestOperations.cs index 808eb30b705c2..0972c1eb1da8c 100644 --- a/sdk/testcommon/Azure.Graph.Rbac/src/Generated/ServicePrincipalsRestOperations.cs +++ b/sdk/testcommon/Azure.Graph.Rbac/src/Generated/ServicePrincipalsRestOperations.cs @@ -93,7 +93,7 @@ public async Task> CreateAsync(ServicePrincipalCreate return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -120,7 +120,7 @@ public Response Create(ServicePrincipalCreateParameters parame return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -161,7 +161,7 @@ public async Task> ListAsync(string filter return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -182,7 +182,7 @@ public Response List(string filter = null, Cancellat return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -230,7 +230,7 @@ public async Task UpdateAsync(string objectId, ServicePrincipalUpdateP case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -257,7 +257,7 @@ public Response Update(string objectId, ServicePrincipalUpdateParameters paramet case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -296,7 +296,7 @@ public async Task DeleteAsync(string objectId, CancellationToken cance case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -318,7 +318,7 @@ public Response Delete(string objectId, CancellationToken cancellationToken = de case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -362,7 +362,7 @@ public async Task> GetAsync(string objectId, Cancella return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -389,7 +389,7 @@ public Response Get(string objectId, CancellationToken cancell return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -434,7 +434,7 @@ public async Task> ListAppRoleAssignedToAs return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -461,7 +461,7 @@ public Response ListAppRoleAssignedTo(string object return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -506,7 +506,7 @@ public async Task> ListAppRoleAssignmentsA return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -533,7 +533,7 @@ public Response ListAppRoleAssignments(string objec return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -578,7 +578,7 @@ public async Task> ListOwnersAsync(string ob return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -605,7 +605,7 @@ public Response ListOwners(string objectId, Cancellat return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -654,7 +654,7 @@ public async Task AddOwnerAsync(string objectId, AddOwnerParameters pa case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -681,7 +681,7 @@ public Response AddOwner(string objectId, AddOwnerParameters parameters, Cancell case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -727,7 +727,7 @@ public async Task RemoveOwnerAsync(string objectId, string ownerObject case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -754,7 +754,7 @@ public Response RemoveOwner(string objectId, string ownerObjectId, CancellationT case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -799,7 +799,7 @@ public async Task> ListKeyCredentialsAsync(str return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -826,7 +826,7 @@ public Response ListKeyCredentials(string objectId, Can return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -875,7 +875,7 @@ public async Task UpdateKeyCredentialsAsync(string objectId, KeyCreden case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -902,7 +902,7 @@ public Response UpdateKeyCredentials(string objectId, KeyCredentialsUpdateParame case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -947,7 +947,7 @@ public async Task> ListPasswordCredential return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -974,7 +974,7 @@ public Response ListPasswordCredentials(string obj return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -1023,7 +1023,7 @@ public async Task UpdatePasswordCredentialsAsync(string objectId, Pass case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -1050,7 +1050,7 @@ public Response UpdatePasswordCredentials(string objectId, PasswordCredentialsUp case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -1094,7 +1094,7 @@ public async Task> ListNextAsync(string nex return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -1121,7 +1121,7 @@ public Response ListNext(string nextLink, Cancellati return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -1166,7 +1166,7 @@ public async Task> ListAppRoleAssignedToNe return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -1198,7 +1198,7 @@ public Response ListAppRoleAssignedToNextPage(strin return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -1243,7 +1243,7 @@ public async Task> ListAppRoleAssignmentsN return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -1275,7 +1275,7 @@ public Response ListAppRoleAssignmentsNextPage(stri return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -1320,7 +1320,7 @@ public async Task> ListOwnersNextPageAsync(s return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -1352,7 +1352,7 @@ public Response ListOwnersNextPage(string nextLink, s return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -1392,7 +1392,7 @@ public async Task> ListNextNextPageAsync(st return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -1419,7 +1419,7 @@ public Response ListNextNextPage(string nextLink, Ca return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } } diff --git a/sdk/testcommon/Azure.Graph.Rbac/src/Generated/SignedInUserRestOperations.cs b/sdk/testcommon/Azure.Graph.Rbac/src/Generated/SignedInUserRestOperations.cs index 640e568837f32..49ce61ad29613 100644 --- a/sdk/testcommon/Azure.Graph.Rbac/src/Generated/SignedInUserRestOperations.cs +++ b/sdk/testcommon/Azure.Graph.Rbac/src/Generated/SignedInUserRestOperations.cs @@ -82,7 +82,7 @@ public async Task> GetAsync(CancellationToken cancellationToken = return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -102,7 +102,7 @@ public Response Get(CancellationToken cancellationToken = default) return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -138,7 +138,7 @@ public async Task> ListOwnedObjectsAsync(Can return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -158,7 +158,7 @@ public Response ListOwnedObjects(CancellationToken ca return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -202,7 +202,7 @@ public async Task> ListOwnedObjectsNextAsync return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -229,7 +229,7 @@ public Response ListOwnedObjectsNext(string nextLink, return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -269,7 +269,7 @@ public async Task> ListOwnedObjectsNextNextP return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -296,7 +296,7 @@ public Response ListOwnedObjectsNextNextPage(string n return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } } diff --git a/sdk/testcommon/Azure.Graph.Rbac/src/Generated/UsersRestOperations.cs b/sdk/testcommon/Azure.Graph.Rbac/src/Generated/UsersRestOperations.cs index a7eb338713395..aed12359a9839 100644 --- a/sdk/testcommon/Azure.Graph.Rbac/src/Generated/UsersRestOperations.cs +++ b/sdk/testcommon/Azure.Graph.Rbac/src/Generated/UsersRestOperations.cs @@ -93,7 +93,7 @@ public async Task> CreateAsync(UserCreateParameters parameters, C return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -120,7 +120,7 @@ public Response Create(UserCreateParameters parameters, CancellationToken return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -171,7 +171,7 @@ public async Task> ListAsync(string filter = null, stri return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -194,7 +194,7 @@ public Response List(string filter = null, string expand = null, return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -238,7 +238,7 @@ public async Task> GetAsync(string upnOrObjectId, CancellationTok return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -265,7 +265,7 @@ public Response Get(string upnOrObjectId, CancellationToken cancellationTo return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -313,7 +313,7 @@ public async Task UpdateAsync(string upnOrObjectId, UserUpdateParamete case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -340,7 +340,7 @@ public Response Update(string upnOrObjectId, UserUpdateParameters parameters, Ca case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -379,7 +379,7 @@ public async Task DeleteAsync(string upnOrObjectId, CancellationToken case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -401,7 +401,7 @@ public Response Delete(string upnOrObjectId, CancellationToken cancellationToken case 204: return message.Response; default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -455,7 +455,7 @@ public async Task> GetMemberGroupsAsync(stri return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -487,7 +487,7 @@ public Response GetMemberGroups(string objectId, User return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -531,7 +531,7 @@ public async Task> ListNextAsync(string nextLink, Cance return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -558,7 +558,7 @@ public Response ListNext(string nextLink, CancellationToken canc return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } @@ -598,7 +598,7 @@ public async Task> ListNextNextPageAsync(string nextLin return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } @@ -625,7 +625,7 @@ public Response ListNextNextPage(string nextLink, CancellationTo return Response.FromValue(value, message.Response); } default: - throw new RequestFailedException(message.Response); + throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } }