Add Telemetry (#704)

This commit is contained in:
Brahim Hadriche authored and GitHub committed 2025-08-29 15:22:57 -04:00
1 parent 92789b0566
commit b657664546
14 files changed
+186 -2

No files matched your search

@@ -107,9 +107,13 @@ namespace InnertubeService
try
parsedResponse = Innertube.ParseInnertubePlayerResponse(playerResponse.Json(), playerRequest.signatureTimestamp, cancellation)
catch exception
if ValidString(exception.code) = "STS_MISMATCH"
code = ValidString(exception.code)
if code = "STS_MISMATCH"
return GetVideoMetadata(videoId, options)
end if
if code = "MISSING_FORMAT_FIELD"
m.global.telemetry.LogError = code + `\n` + playerRequest.ToCurlCommand() + `\n` + playerResponse.Text()
end if
throw exception
end try
if parsedResponse.error <> invalid