fix: log failing api request

pull/63/head
sualko 2020-06-10 13:53:46 +02:00
parent bde396ed4a
commit d7a0bfd47e
1 changed files with 4 additions and 4 deletions

View File

@ -76,12 +76,12 @@ class API
public function createMeeting(Room $room, Presentation $presentation = null) public function createMeeting(Room $room, Presentation $presentation = null)
{ {
$bbb = $this->getServer(); $bbb = $this->getServer();
$meetingParams = $this->buildMeetingParams($room, $presentation);
try { try {
$response = $bbb->createMeeting($this->buildMeetingParams($room, $presentation)); $response = $bbb->createMeeting($meetingParams);
} catch (\Exception $e) { } catch (\Exception $e) {
throw $e; throw new \Exception('Can not process create request: ' . $bbb->getCreateMeetingUrl($meetingParams));
throw new \Exception('Can not process create request');
} }
if (!$response->success()) { if (!$response->success()) {
@ -91,7 +91,7 @@ class API
return $response->getCreationTime(); return $response->getCreationTime();
} }
private function buildMeetingParams(Room $room, Presentation $presentation = null) private function buildMeetingParams(Room $room, Presentation $presentation = null): CreateMeetingParameters
{ {
$createMeetingParams = new CreateMeetingParameters($room->uid, $room->name); $createMeetingParams = new CreateMeetingParameters($room->uid, $room->name);
$createMeetingParams->setAttendeePassword($room->attendeePassword); $createMeetingParams->setAttendeePassword($room->attendeePassword);