Commit 6735c9f0 authored by Marko Obrovac's avatar Marko Obrovac Committed by Marko Obrovac
Browse files

Do not try to set the stack trace of undefined objects; rel v2.7.1

Sometimes we can get `undefined` as the error object to log. When that's
the case, don't attempt to add the stack trace, nor log it (since bunyan
doesn't log empty messages).
parent 368e391a
......@@ -47,9 +47,9 @@ class BaseService {
this._unhandledRejectionHandler = (err) => {
if (!this._inLogger) {
if (!this._inLogger && err) {
this._inLogger = true;
if (!err.stack) {
if (!err.stack && err instanceof Error) {
this._logger.log('fatal/service-runner/unhandled', err);
"name": "service-runner",
"version": "2.7.0",
"version": "2.7.1",
"description": "Generic nodejs service supervisor / cluster runner",
"main": "service-runner.js",
"bin": {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment