@@ -262,13 +262,13 @@ Catching Exceptions
262262-------------------
263263
264264If something should go wrong with the API call, an exception will be raised.
265- :exc: `SparkApiError ` exceptions are raised when an error condition is
265+ :exc: `ApiError ` exceptions are raised when an error condition is
266266returned from the Webex Teams cloud. Details will be provided in the error
267267message.
268268
269269.. code-block :: python
270270
271- >> > from webexteamsdk import CiscoSparkAPI, SparkApiError
271+ >> > from webexteamsdk import CiscoSparkAPI, ApiError
272272 >> > api = CiscoSparkAPI()
273273 >> > room = api.rooms.create(" webexteamsdk Test Room" )
274274 >> > me = api.people.me()
@@ -281,19 +281,19 @@ message.
281281 check_response_code(response, erc)
282282 File " webexteamsdk/utils.py" , line 104 , in check_response_code
283283 response= response)
284- webexteamsdk.exceptions.SparkApiError : Response Code [409 ] - The request
284+ webexteamsdk.exceptions.ApiError : Response Code [409 ] - The request
285285 could not be processed because it conflicts with some established rule of
286286 the system. For example, a person may not be added to a room more than
287287 once.
288288
289289 You can catch any errors returned by the Webex Teams cloud by catching
290- :exc: `SparkApiError ` exceptions in a try-except block.
290+ :exc: `ApiError ` exceptions in a try-except block.
291291
292292.. code-block :: python
293293
294294 >> > try :
295295 ... api.memberships.create(roomId = room.id, personId = me.id)
296- ... except SparkApiError as e:
296+ ... except ApiError as e:
297297 ... memberships = api.memberships.list(roomId = room.id)
298298 ... for membership in memberships:
299299 ... if membership.personId == me.id:
0 commit comments