Catch case where github sends bad json data (#13077)

This commit is contained in:
Nicolas Mowen 2024-08-14 19:41:41 -06:00 committed by GitHub
parent f6b61c26ae
commit 2e724291db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,6 +4,7 @@ import asyncio
import os
import shutil
import time
from json import JSONDecodeError
from typing import Any, Optional
import psutil
@ -35,7 +36,7 @@ def get_latest_version(config: FrigateConfig) -> str:
"https://api.github.com/repos/blakeblackshear/frigate/releases/latest",
timeout=10,
)
except RequestException:
except (RequestException, JSONDecodeError):
return "unknown"
response = request.json()