fix(core): On unhandled rejections, extract the original exception correctly (#11389)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2024-10-24 20:02:05 +02:00 committed by Iván Ovejero
parent 247bcc16c8
commit 343eb53116
No known key found for this signature in database

View file

@ -66,9 +66,13 @@ export const initErrorHandling = async () => {
},
}),
],
beforeSend(event, { originalException }) {
async beforeSend(event, { originalException }) {
if (!originalException) return null;
if (originalException instanceof Promise) {
originalException = await originalException.catch((error) => error as Error);
}
if (originalException instanceof AxiosError) return null;
if (