@@ -58,8 +58,7 @@ def list(
58
58
:return: An iterator like instance of IntegrationAccountSession
59
59
:rtype:
60
60
~azure.mgmt.logic.models.IntegrationAccountSessionPaged[~azure.mgmt.logic.models.IntegrationAccountSession]
61
- :raises:
62
- :class:`ErrorResponseException<azure.mgmt.logic.models.ErrorResponseException>`
61
+ :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
63
62
"""
64
63
def internal_paging (next_link = None , raw = False ):
65
64
@@ -100,7 +99,9 @@ def internal_paging(next_link=None, raw=False):
100
99
response = self ._client .send (request , stream = False , ** operation_config )
101
100
102
101
if response .status_code not in [200 ]:
103
- raise models .ErrorResponseException (self ._deserialize , response )
102
+ exp = CloudError (response )
103
+ exp .request_id = response .headers .get ('x-ms-request-id' )
104
+ raise exp
104
105
105
106
return response
106
107
@@ -133,8 +134,7 @@ def get(
133
134
:return: IntegrationAccountSession or ClientRawResponse if raw=true
134
135
:rtype: ~azure.mgmt.logic.models.IntegrationAccountSession or
135
136
~msrest.pipeline.ClientRawResponse
136
- :raises:
137
- :class:`ErrorResponseException<azure.mgmt.logic.models.ErrorResponseException>`
137
+ :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
138
138
"""
139
139
# Construct URL
140
140
url = self .get .metadata ['url' ]
@@ -165,7 +165,9 @@ def get(
165
165
response = self ._client .send (request , stream = False , ** operation_config )
166
166
167
167
if response .status_code not in [200 ]:
168
- raise models .ErrorResponseException (self ._deserialize , response )
168
+ exp = CloudError (response )
169
+ exp .request_id = response .headers .get ('x-ms-request-id' )
170
+ raise exp
169
171
170
172
deserialized = None
171
173
@@ -199,8 +201,7 @@ def create_or_update(
199
201
:return: IntegrationAccountSession or ClientRawResponse if raw=true
200
202
:rtype: ~azure.mgmt.logic.models.IntegrationAccountSession or
201
203
~msrest.pipeline.ClientRawResponse
202
- :raises:
203
- :class:`ErrorResponseException<azure.mgmt.logic.models.ErrorResponseException>`
204
+ :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
204
205
"""
205
206
# Construct URL
206
207
url = self .create_or_update .metadata ['url' ]
@@ -235,7 +236,9 @@ def create_or_update(
235
236
response = self ._client .send (request , stream = False , ** operation_config )
236
237
237
238
if response .status_code not in [200 , 201 ]:
238
- raise models .ErrorResponseException (self ._deserialize , response )
239
+ exp = CloudError (response )
240
+ exp .request_id = response .headers .get ('x-ms-request-id' )
241
+ raise exp
239
242
240
243
deserialized = None
241
244
0 commit comments