function handleMakeDirectoryError (err) {
  console.error(err)
  if (err.code === 'EEXIST') {
    throw createError(
      400,
      'Room is already being compiled. Wait for the current compilation to finish before compiling again.'
    )
  } else if (err) {
    throw createError(500, 'Error writing room directory')
  }
}
/**
 * throws the correct HttpError when an error is thrown creating a directory
 * @param {Error} err
 */
throws the correct HttpError when an error is thrown creating a directory
@param {Error} err
throws the correct HttpError when an error is thrown creating a directory @param { Error } err
function handleMakeDirectoryError (err) {
  console.error(err)
  if (err.code === 'EEXIST') {
    throw createError(
      400,
      'Room is already being compiled. Wait for the current compilation to finish before compiling again.'
    )
  } else if (err) {
    throw createError(500, 'Error writing room directory')
  }
}
function handleMakeDirectoryError ( err ) { console . error ( err ) if ( err . code === 'EEXIST' ) { throw createError ( 400 , 'Room is already being compiled. Wait for the current compilation to finish before compiling again.' ) } else if ( err ) { throw createError ( 500 , 'Error writing room directory' ) } }
throws the correct HttpError when an error is thrown creating a directory
 @param {Error} err
throws the correct HttpError when an error is thrown creating a directory @param { Error } err