Commit d6e92804 authored by Vignesh Mohankumar's avatar Vignesh Mohankumar Committed by GitHub

fix: filter AbortError from Sentry (#6497)

parent f0d8f8b2
......@@ -201,4 +201,9 @@ describe('filterKnownErrors', () => {
expect(filterKnownErrors(ERROR, { originalException })).toBeNull()
})
})
it('filters AbortErrors', () => {
const originalException = new Error('AbortError: The user aborted a request.')
expect(filterKnownErrors(ERROR, { originalException })).toBeNull()
})
})
......@@ -96,6 +96,9 @@ export const filterKnownErrors: Required<ClientOptions>['beforeSend'] = (event:
if (error.message.match(/WebAssembly.instantiate\(\): Wasm code generation disallowed by embedder/)) {
return null
}
// These are caused by user navigation away from the page before a request has finished.
if (error.message.startsWith('AbortError')) return null
}
return event
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment