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
82e7925a
Unverified
Commit
82e7925a
authored
May 09, 2023
by
Vignesh Mohankumar
Committed by
GitHub
May 09, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: properly filter AbortErrors (#6519)
* fix: properly filter AbortErrors * lol
parent
2150347b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
errors.test.ts
src/tracing/errors.test.ts
+1
-1
errors.ts
src/tracing/errors.ts
+1
-1
No files found.
src/tracing/errors.test.ts
View file @
82e7925a
...
@@ -152,7 +152,7 @@ describe('filterKnownErrors', () => {
...
@@ -152,7 +152,7 @@ describe('filterKnownErrors', () => {
})
})
it
(
'
filters AbortErrors
'
,
()
=>
{
it
(
'
filters AbortErrors
'
,
()
=>
{
const
originalException
=
new
Error
(
'
AbortError: The user aborted a request.
'
)
const
originalException
=
new
DOMException
(
'
The user aborted a request.
'
,
'
AbortError
'
)
expect
(
filterKnownErrors
(
ERROR
,
{
originalException
})).
toBeNull
()
expect
(
filterKnownErrors
(
ERROR
,
{
originalException
})).
toBeNull
()
})
})
})
})
src/tracing/errors.ts
View file @
82e7925a
...
@@ -110,7 +110,7 @@ export const filterKnownErrors: Required<ClientOptions>['beforeSend'] = (event:
...
@@ -110,7 +110,7 @@ export const filterKnownErrors: Required<ClientOptions>['beforeSend'] = (event:
}
}
// These are caused by user navigation away from the page before a request has finished.
// These are caused by user navigation away from the page before a request has finished.
if
(
error
.
message
.
startsWith
(
'
AbortError
'
)
)
return
null
if
(
error
instanceof
DOMException
&&
error
.
name
===
'
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