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
+5 -1
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 (