mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-24 14:23:53 +00:00
Exclude localStorage errors from error-logging
Bug: T253084 Change-Id: I1117be62d5a5ae0725836fae49fd325a07b0f83d
This commit is contained in:
parent
07baf70613
commit
145d23ee0f
|
@ -4,10 +4,16 @@
|
|||
COUNTER_NAME = 'counter.MediaWiki.minerva.WebClientError' + suffix;
|
||||
|
||||
/**
|
||||
* Count javascript error
|
||||
* Count javascript errors, except for those associated with localStorage
|
||||
* being full or unavailable.
|
||||
* @param {string} topic name of the event being tracked
|
||||
* @param {Object} data event payload
|
||||
*/
|
||||
function countError() {
|
||||
track( COUNTER_NAME, 1 );
|
||||
function countError( topic, data ) {
|
||||
var isLocalStorage = data && data.source === 'store-localstorage-update';
|
||||
if ( !isLocalStorage ) {
|
||||
track( COUNTER_NAME, 1 );
|
||||
}
|
||||
}
|
||||
|
||||
if ( config.get( 'wgMinervaCountErrors' ) ) {
|
||||
|
|
Loading…
Reference in a new issue