diff --git a/src/ApplicationInsights.ts b/src/ApplicationInsights.ts index 7f08efd..7a4ab61 100644 --- a/src/ApplicationInsights.ts +++ b/src/ApplicationInsights.ts @@ -316,9 +316,9 @@ class ApplicationInsights { handledAt: "Unhandled", exceptions: [ { - typeName: exception.name, - message: exception.message, - stack: exception.stack, + typeName: exception.name || "Unhandled", + message: exception.message || "Unhandled", + stack: exception.stack || "Unhandled", parsedStack: parsedStack, hasFullStack: !Tools.isNullOrUndefined(parsedStack) } @@ -370,4 +370,4 @@ class ApplicationInsights { this._commonProperties = this._commonProperties || {}; Tools.extend(this._commonProperties, data); } -} \ No newline at end of file +}