From b7af16c313c2fef393b7183938ee548f246e596b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alper=20=C3=96z=C4=B1=C5=9F=C4=B1k?= Date: Mon, 21 Nov 2016 08:57:45 +0200 Subject: [PATCH] Fix for undefined error log in console When css|less build fails it is logging as undefined in console. In that case err object does not have any stack property. Printing the error itself in that case will be sufficient. --- plugins/c9.error/error_handler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/c9.error/error_handler.js b/plugins/c9.error/error_handler.js index 4e3fe2af..323a89cb 100644 --- a/plugins/c9.error/error_handler.js +++ b/plugins/c9.error/error_handler.js @@ -115,7 +115,7 @@ function plugin(options, imports, register) { var accept = req.headers.accept || ''; if (statusCode == 500) { - console.error(err && err.stack); + console.error(err && (err.stack || err)); emitter.emit("internalServerError", { err: err, req: req