@@ -39,11 +39,21 @@ export class Metrics {
39
39
'Number of times that the message "Sign in to confirm you’re not a bot." has been returned by Innertube API' ,
40
40
) ;
41
41
42
+ private innertubeErrorReasonVpnProxyDetected = this . createCounter (
43
+ "innertube_error_reason_VpnProxyDetected_total" ,
44
+ 'Number of times that the message "VPN/Proxy Detected" has been returned by Innertube API' ,
45
+ ) ;
46
+
42
47
private innertubeErrorSubreasonProtectCommunity = this . createCounter (
43
48
"innertube_error_subreason_ProtectCommunity_total" ,
44
49
'Number of times that the message "This helps protect our community." has been returned by Innertube API' ,
45
50
) ;
46
51
52
+ private innertubeErrorSubreasonVpnProxyDetected = this . createCounter (
53
+ "innertube_error_subreason_VpnProxyDetected_total" ,
54
+ 'Number of times that the message "To continue, turn off your VPN/Proxy. This will allow YouTube to locate the best content." has been returned by Innertube API' ,
55
+ ) ;
56
+
47
57
private innertubeErrorReasonUnknown = this . createCounter (
48
58
"innertube_error_reason_unknown_total" ,
49
59
"Number of times that an unknown reason has been returned by the Innertube API" ,
@@ -252,6 +262,11 @@ export class Metrics {
252
262
return ;
253
263
}
254
264
265
+ if ( error . vpnProxy ) {
266
+ this . innertubeErrorReasonVpnProxyDetected . inc ( ) ;
267
+ return ;
268
+ }
269
+
255
270
if ( error . signInToConfirmBot ) {
256
271
this . innertubeErrorReasonSignIn . inc ( ) ;
257
272
return ;
@@ -329,6 +344,11 @@ export class Metrics {
329
344
return ;
330
345
}
331
346
347
+ if ( error . vpnProxy ) {
348
+ this . innertubeErrorSubreasonVpnProxyDetected . inc ( ) ;
349
+ return ;
350
+ }
351
+
332
352
if ( error . thisHelpsProtectCommunity ) {
333
353
this . innertubeErrorSubreasonProtectCommunity . inc ( ) ;
334
354
return ;
0 commit comments