Hi Allan,
If you had returned a non-200, you would have gotten an exception thrown. A 202 is considered a valid return code as it shows the message has been successfully accepted, but has not been completely processed yet. Since there was no error HTTP status code, there would be no APIException thrown.
Thanks,
John
------------------------------
John Carnell
Director, Developer Engagement
------------------------------
Original Message:
Sent: 05-22-2025 09:56
From: Allan Zhao
Subject: Python code issue when i tried to get_conversation_recordings
Yes, you are right. I already add the loop twice to make sure getting the right response.
It seems python is not good choice for GC development as when there is not recording to the conversation, there is an exception not a response.
------------------------------
Allan Zhao
------------------------------
Original Message:
Sent: 05-22-2025 04:19
From: Harry Boskur
Subject: Python code issue when i tried to get_conversation_recordings
It's expected to return 202 as your request takes time for the recording to process and after sometime it should return you 200 ok with the media uri.
Use a for loop with a variable which tries for 2 or more times with the same conversion ID with a wait time of 1-2 seconds
Check if the responds is empty run it again till you get the response with uri
------------------------------
Harry Boskur