Skip to content

Commit 2d9b15b

Browse files
add comment for errors thrown (Azure#29744)
1 parent c05e0e9 commit 2d9b15b

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_call_automation_client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ def create_call(
188188
:type azure_cognitive_services_endpoint_url: str
189189
:return: Instance of CreateCallResult.
190190
:rtype: CreateCallResult
191+
:raises ~azure.core.exceptions.HttpResponseError
191192
"""
192193

193194
if not target:
@@ -264,6 +265,7 @@ def create_group_call(
264265
:type voip_headers: Dict[str, str]
265266
:return: Instance of CreateCallResult.
266267
:rtype: CreateCallResult
268+
:raises ~azure.core.exceptions.HttpResponseError
267269
"""
268270

269271
if not targets:
@@ -345,6 +347,7 @@ def answer_call(
345347
:type repeatability_first_sent: str
346348
:return: Instance of AnswerCallResult.
347349
:rtype: AnswerCallResult
350+
:raises ~azure.core.exceptions.HttpResponseError
348351
"""
349352

350353
if not incoming_call_context:
@@ -396,6 +399,7 @@ def redirect_call(
396399
:type target: CallInvite
397400
:return: None
398401
:rtype: None
402+
:raises ~azure.core.exceptions.HttpResponseError
399403
"""
400404

401405
if not incoming_call_context:
@@ -437,6 +441,7 @@ def reject_call(
437441
:type call_reject_reason: str or CallRejectReason
438442
:return: None
439443
:rtype: None
444+
:raises ~azure.core.exceptions.HttpResponseError
440445
"""
441446

442447
if not incoming_call_context:

sdk/communication/azure-communication-callautomation/azure/communication/callautomation/_call_connection_client.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ def get_call_properties(self, **kwargs) -> CallConnectionProperties:
8080
8181
:return: CallConnectionProperties
8282
:type: CallConnectionProperties
83+
:raises ~azure.core.exceptions.HttpResponseError
8384
"""
8485
return CallConnectionProperties._from_generated( # pylint:disable=protected-access
8586
self._call_connection_client.get_call(call_connection_id=self.call_connection_id, **kwargs))
@@ -105,6 +106,7 @@ def hang_up(self, is_for_everyone: bool, **kwargs) -> None:
105106
:type repeatability_first_sent: str
106107
:return: None
107108
:type: None
109+
:raises ~azure.core.exceptions.HttpResponseError
108110
"""
109111

110112
repeatability_request_id = kwargs.pop("repeatability_request_id", None)
@@ -129,6 +131,7 @@ def get_participant(self, participantMri: str, **kwargs) -> CallParticipant:
129131
:param participant_raw_id: Raw id of the participant to retrieve. Required.
130132
:type participant_raw_id: str
131133
:return: CallParticipant
134+
:raises ~azure.core.exceptions.HttpResponseError
132135
"""
133136
return CallParticipant._from_generated( # pylint:disable=protected-access
134137
self._call_connection_client.get_participant(self.call_connection_id, participantMri, **kwargs))
@@ -143,6 +146,7 @@ def list_participants(self, **kwargs) -> GetParticipantsResponse:
143146
:param participant_raw_id: Raw id of the participant to retrieve. Required.
144147
:type participant_raw_id: str
145148
:return: GetParticipantsResponse
149+
:raises ~azure.core.exceptions.HttpResponseError
146150
"""
147151
return GetParticipantsResponse._from_generated( # pylint:disable=protected-access
148152
self._call_connection_client.get_participants(self.call_connection_id, **kwargs))
@@ -168,6 +172,7 @@ def transfer_call_to_participant(self, target: CallInvite, **kwargs: Any) -> Tra
168172
Example: Sun, 06 Nov 1994 08:49:37 GMT. Default value is None.
169173
:type repeatability_first_sent: str
170174
:return: TransferCallResponse
175+
:raises ~azure.core.exceptions.HttpResponseError
171176
"""
172177
user_custom_context = CustomContext(
173178
voip_headers=target.voipHeaders, sip_headers=target.sipHeaders)
@@ -210,6 +215,7 @@ def add_participant(self, participant: CallInvite, **kwargs: Any) -> AddParticip
210215
Example: Sun, 06 Nov 1994 08:49:37 GMT. Default value is None.
211216
:type repeatability_first_sent: str
212217
:return: AddParticipantResponse
218+
:raises ~azure.core.exceptions.HttpResponseError
213219
"""
214220
user_custom_context = CustomContext(
215221
voip_headers=participant.voipHeaders, sip_headers=participant.sipHeaders)
@@ -254,6 +260,7 @@ def remove_participant(self, participant: CommunicationIdentifier, **kwargs: Any
254260
Example: Sun, 06 Nov 1994 08:49:37 GMT. Default value is None.
255261
:type repeatability_first_sent: str
256262
:return: AddParticipantResponse
263+
:raises ~azure.core.exceptions.HttpResponseError
257264
"""
258265

259266
remove_participant_request = RemoveParticipantRequest(participant_to_remove=serialize_identifier(participant),

0 commit comments

Comments
 (0)