diff --git a/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/IMarketplaceAgreementsOperations.cs b/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/IMarketplaceAgreementsOperations.cs
index 1213141eebe4..e82673b05fa4 100644
--- a/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/IMarketplaceAgreementsOperations.cs
+++ b/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/IMarketplaceAgreementsOperations.cs
@@ -41,7 +41,7 @@ public partial interface IMarketplaceAgreementsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -156,7 +156,7 @@ public partial interface IMarketplaceAgreementsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -175,7 +175,7 @@ public partial interface IMarketplaceAgreementsOperations
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
diff --git a/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/MarketplaceAgreementsOperations.cs b/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/MarketplaceAgreementsOperations.cs
index f8a57a7da1c2..4e364e851476 100644
--- a/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/MarketplaceAgreementsOperations.cs
+++ b/sdk/marketplaceordering/Microsoft.Azure.Management.MarketplaceOrdering/src/Generated/MarketplaceAgreementsOperations.cs
@@ -68,7 +68,7 @@ internal MarketplaceAgreementsOperations(MarketplaceOrderingAgreementsClient cli
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -193,14 +193,13 @@ internal MarketplaceAgreementsOperations(MarketplaceOrderingAgreementsClient cli
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -210,10 +209,6 @@ internal MarketplaceAgreementsOperations(MarketplaceOrderingAgreementsClient cli
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
if (_shouldTrace)
{
ServiceClientTracing.Error(_invocationId, ex);
@@ -893,7 +888,7 @@ internal MarketplaceAgreementsOperations(MarketplaceOrderingAgreementsClient cli
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -1015,14 +1010,13 @@ internal MarketplaceAgreementsOperations(MarketplaceOrderingAgreementsClient cli
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -1032,10 +1026,6 @@ internal MarketplaceAgreementsOperations(MarketplaceOrderingAgreementsClient cli
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
if (_shouldTrace)
{
ServiceClientTracing.Error(_invocationId, ex);
@@ -1089,7 +1079,7 @@ internal MarketplaceAgreementsOperations(MarketplaceOrderingAgreementsClient cli
///
/// The cancellation token.
///
- ///
+ ///
/// Thrown when the operation returned an invalid status code
///
///
@@ -1193,14 +1183,13 @@ internal MarketplaceAgreementsOperations(MarketplaceOrderingAgreementsClient cli
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -1210,10 +1199,6 @@ internal MarketplaceAgreementsOperations(MarketplaceOrderingAgreementsClient cli
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
if (_shouldTrace)
{
ServiceClientTracing.Error(_invocationId, ex);