fix(events): ignore non-UTF-8 event overrides (#3897)

Assisted-by: GitHub Copilot (model: GPT-5.6 Sol, autonomous)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Marsel Safin
2026-08-03 16:31:22 -05:00
committed by GitHub
co-authored by Copilot
parent f8b3d604e1
commit ab468c4db7
2 changed files with 21 additions and 2 deletions
+4 -2
View File
@@ -737,8 +737,10 @@ def resolve_events(
if override_file.exists():
try:
override = yaml.safe_load(override_file.read_text(encoding="utf-8")) or {}
except yaml.YAMLError:
logger.warning("Could not parse %s; ignoring override", override_file)
except (OSError, UnicodeError, yaml.YAMLError):
logger.warning(
"Could not read or parse %s; ignoring override", override_file
)
override = {}
integrations = override.get("integrations", {}) if isinstance(override, dict) else {}
if isinstance(integrations, dict) and integration_key in integrations: