tryRespondWithError = res => {
        try {
          res.writeHead(500, { 'Content-Type': 'text/plain' });
          res.end('Internal Server Error');
        } catch (error) {
          console.error(error);
        }
      }
@type {Record<string, string | Array<string> | undefined>}