Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

CRM-14907: UnhandledRejection: Non-Error promise rejection captured with value: #152

Merged
merged 1 commit into from
May 9, 2023

Conversation

Wolfrank1149
Copy link
Contributor

@Wolfrank1149 Wolfrank1149 commented May 9, 2023

LIBS-268

L'erreur est causé par la fonction Safe Link de Microsoft. La solution est d'ignoré l'erreur ou de convaincre Microsoft de ne plus envoyer l'erreur. (Je choisis d'ignorer l'erreur)

Source: getsentry/sentry-javascript#3440

@Wolfrank1149 Wolfrank1149 requested a review from a team May 9, 2023 12:36
@@ -173,8 +173,7 @@ export default class Application extends EventEmitter {
return;
}

const reason = event.reason;
this.logError('Unhandled promise rejection', event.reason);
this.logError('Unhandled promise rejection', error);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ça m'a pris du temps comprendre pourquoi tu avais changé ça avant de voir que la variable était useless et que error = event.reason

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J'aurais dû ajouter ça dans la description de ma pr.

@@ -2479,6 +2478,15 @@ export default class Application extends EventEmitter {
});
return null;
}
// Ignore benign error: https://github.com/getsentry/sentry-javascript/issues/3440
if (hint.originalException.message === 'Non-Error promise rejection captured with value:') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je pense que c'est un cool compromis de le mettre en breadcrumb

@Wolfrank1149 Wolfrank1149 merged commit 47293ab into master May 9, 2023
@Wolfrank1149 Wolfrank1149 deleted the dev/CRM-14907 branch May 9, 2023 12:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants