From 4d86d29365d879c6d67f818206ebff4afcb19477 Mon Sep 17 00:00:00 2001 From: varshit97plivo Date: Thu, 14 Oct 2021 15:49:49 +0530 Subject: [PATCH] add error handling in conferenc eget and list --- src/Plivo/Resources/Conference/ConferenceInterface.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Plivo/Resources/Conference/ConferenceInterface.php b/src/Plivo/Resources/Conference/ConferenceInterface.php index aa7a73c1..fb0d4589 100644 --- a/src/Plivo/Resources/Conference/ConferenceInterface.php +++ b/src/Plivo/Resources/Conference/ConferenceInterface.php @@ -61,7 +61,9 @@ public function get($conferenceName) $optionalArgs ); - + if($response->getThrownException() != null) { + throw $response->getThrownException(); + } return new Conference( $this->client, @@ -82,6 +84,9 @@ public function getList() ); $conferenceNames = $response->getContent()['conferences']; + if($response->getThrownException() != null) { + throw $response->getThrownException(); + } return $conferenceNames; }