Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
d6e92804
Unverified
Commit
d6e92804
authored
May 08, 2023
by
Vignesh Mohankumar
Committed by
GitHub
May 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: filter AbortError from Sentry (#6497)
parent
f0d8f8b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
errors.test.ts
src/tracing/errors.test.ts
+5
-0
errors.ts
src/tracing/errors.ts
+3
-0
No files found.
src/tracing/errors.test.ts
View file @
d6e92804
...
@@ -201,4 +201,9 @@ describe('filterKnownErrors', () => {
...
@@ -201,4 +201,9 @@ describe('filterKnownErrors', () => {
expect
(
filterKnownErrors
(
ERROR
,
{
originalException
})).
toBeNull
()
expect
(
filterKnownErrors
(
ERROR
,
{
originalException
})).
toBeNull
()
})
})
})
})
it
(
'
filters AbortErrors
'
,
()
=>
{
const
originalException
=
new
Error
(
'
AbortError: The user aborted a request.
'
)
expect
(
filterKnownErrors
(
ERROR
,
{
originalException
})).
toBeNull
()
})
})
})
src/tracing/errors.ts
View file @
d6e92804
...
@@ -96,6 +96,9 @@ export const filterKnownErrors: Required<ClientOptions>['beforeSend'] = (event:
...
@@ -96,6 +96,9 @@ export const filterKnownErrors: Required<ClientOptions>['beforeSend'] = (event:
if
(
error
.
message
.
match
(
/WebAssembly.instantiate
\(\)
: Wasm code generation disallowed by embedder/
))
{
if
(
error
.
message
.
match
(
/WebAssembly.instantiate
\(\)
: Wasm code generation disallowed by embedder/
))
{
return
null
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
return
event
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment