From 255bb19dea0bbae3403bcfe7452eace640a5de44 Mon Sep 17 00:00:00 2001 From: Matt Godbolt Date: Wed, 13 Jan 2021 22:31:53 -0600 Subject: [PATCH] Fix warning message, see #2388 --- lib/handlers/compile.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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) {