Fix warning message, see #2388

This commit is contained in:
Matt Godbolt
2021-01-13 22:31:53 -06:00
parent 6da737799d
commit 255bb19dea
+3 -2
View File
@@ -195,10 +195,11 @@ export class CompileHandler {
compilerFor(req) {
if (req.is('json')) {
const compiler = this.findCompiler(req.lang || req.body.lang, req.params.compiler);
const lang = req.lang || req.body.lang;
const compiler = this.findCompiler(lang, req.params.compiler);
if (!compiler) {
const withoutBody = _.extend({}, req.body, {source: '<removed>'});
logger.warn(`Unable to find compiler with lang ${req.lang} for request`, withoutBody);
logger.warn(`Unable to find compiler with lang ${lang} for JSON request`, withoutBody);
}
return compiler;
} else if (req.body && req.body.compiler) {