mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Excluded errors caused by browser power-saving settings
fix https://linear.app/tryghost/issue/SLO-164/error-aborterror-the-play-request-was-interrupted-because-video-only - in the case that the browser has power-saving settings enabled, we get an error in Sentry - this error does not affect the user experience, so it should be safe to ignore - this adds an exclusion to Sentry to ignore these errors
This commit is contained in:
parent
6c07b1cff9
commit
5f5293cf6d
1 changed files with 5 additions and 0 deletions
|
@ -14,6 +14,11 @@ export function beforeSend(event, hint) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ignore errors that are due to browser power saving settings
|
||||||
|
if (exception?.message?.includes('The play() request was interrupted because video-only background media was paused to save power.')) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
// if the error value includes a model id then overwrite it to improve grouping
|
// if the error value includes a model id then overwrite it to improve grouping
|
||||||
if (event.exception && event.exception.values && event.exception.values.length > 0) {
|
if (event.exception && event.exception.values && event.exception.values.length > 0) {
|
||||||
const pattern = /<(post|page):[a-f0-9]+>/;
|
const pattern = /<(post|page):[a-f0-9]+>/;
|
||||||
|
|
Loading…
Add table
Reference in a new issue