diff --git a/lib/handlers/compile.js b/lib/handlers/compile.js index 390809948..f600e678a 100644 --- a/lib/handlers/compile.js +++ b/lib/handlers/compile.js @@ -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: ''}); - 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) {