Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (pathname === '/rerun') {
rerunRequestHandler(request, response);
} else {
throw new HTTPError(404);
}
} else {
throw new HTTPError(405);
}
} catch (err) {
if (err instanceof HTTPError) {
response.writeHead(err.statusCode);
response.end(err.message || http.STATUS_CODES[err.statusCode]);
} else {
response.writeHead(500);
response.end(http.STATUS_CODES[500]);
log.err('PerformanceXServer', err.code, err);
}
}
}