Skip to content

Commit

Permalink
[BUG] empty messages for unhandled promise rejections #1608 (#1609)
Browse files Browse the repository at this point in the history
  • Loading branch information
MSNev authored Jul 14, 2021
1 parent fd67558 commit 552b046
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion shared/AppInsightsCommon/src/Telemetry/Exception.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ function _stringify(value: any, convertToString: boolean) {
function _formatMessage(theEvent: any, errorType: string) {
let evtMessage = theEvent;
if (theEvent) {
evtMessage = theEvent[strMessage] || theEvent[strDescription] || "";
if (evtMessage && !isString(evtMessage)) {
evtMessage = theEvent[strMessage] || theEvent[strDescription] || evtMessage;
}

// Make sure the message is a string
if (evtMessage && !isString(evtMessage)) {
// tslint:disable-next-line: prefer-conditional-expression
Expand Down

0 comments on commit 552b046

Please sign in to comment.