File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -203,11 +203,7 @@ export async function stopRecording(roomName) {
203203
204204export async function closeRoom ( roomName ) {
205205 if ( ! roomName ) error ( "Trying to close room with no name" ) ;
206-
207- if ( process . env . DAILY_APIKEY === "none" ) {
208- warn ( 'Video call closing check failed. You have set the DAILY_APIKEY to "none", so allowing this error.' ) ;
209- return ;
210- }
206+
211207 // Safely terminate all active recordings
212208 stopRecording ( roomName ) ;
213209
@@ -227,20 +223,24 @@ export async function closeRoom(roomName) {
227223 info ( `Room ${ roomName } closed successfully` ) ;
228224 }
229225 } catch ( err ) {
230- if ( err . response ) {
231- if ( err . response . status === 404 ) {
232- error ( `Room ${ roomName } already closed` ) ;
226+ if ( process . env . DAILY_APIKEY === "none" ) {
227+ warn ( 'Video call closing check failed. You have set the DAILY_APIKEY to "none", so allowing this error.' ) ;
228+ } else {
229+ if ( err . response ) {
230+ if ( err . response . status === 404 ) {
231+ error ( `Room ${ roomName } already closed` ) ;
232+ } else {
233+ error (
234+ `Room ${ roomName } closure request failed with status code ${ err . response . status } ` ,
235+ err . response . data
236+ ) ;
237+ }
233238 } else {
234239 error (
235- `Room ${ roomName } closure request failed with status code ${ err . response . status } ` ,
236- err . response . data
240+ `Error occured while requesting to close room ${ roomName } ` ,
241+ err . message
237242 ) ;
238243 }
239- } else {
240- error (
241- `Error occured while requesting to close room ${ roomName } ` ,
242- err . message
243- ) ;
244244 }
245245 }
246246
You can’t perform that action at this time.
0 commit comments