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 GitHub
parent 95c5df0781
commit 8608baeb7e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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