From 6fe11287f490b9b675d49871d2ce4d19989457c5 Mon Sep 17 00:00:00 2001 From: anhefti Date: Wed, 30 Mar 2022 12:55:42 +0200 Subject: [PATCH] better zoom proctoring error handling --- .../impl/proctoring/ExamProctoringRoomServiceImpl.java | 1 + .../session/impl/proctoring/ZoomProctoringService.java | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/proctoring/ExamProctoringRoomServiceImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/proctoring/ExamProctoringRoomServiceImpl.java index a14265d2..6a09d787 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/proctoring/ExamProctoringRoomServiceImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/proctoring/ExamProctoringRoomServiceImpl.java @@ -364,6 +364,7 @@ public class ExamProctoringRoomServiceImpl implements ExamProctoringRoomService examId, connectionToken, e); + return null; } } diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/proctoring/ZoomProctoringService.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/proctoring/ZoomProctoringService.java index fbbe3bce..3be70848 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/proctoring/ZoomProctoringService.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/proctoring/ZoomProctoringService.java @@ -555,6 +555,11 @@ public class ZoomProctoringService implements ExamProctoringService { credentials, roomName); + final int statusCodeValue = createUser.getStatusCodeValue(); + if (statusCodeValue >= 400) { + throw new RuntimeException("Failed to create new Zoom user for room: " + createUser.getBody()); + } + final UserResponse userResponse = this.jsonMapper.readValue( createUser.getBody(), UserResponse.class);