mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-02 07:09:48 -06:00
Fix warning message, see #2388
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user