fix(worker): keep DLQ failures within the canonical taxonomy

This commit is contained in:
2026-09-20 10:40:05 +03:30
parent 974d2e9744
commit b51b7d5954
3 changed files with 17 additions and 5 deletions

View File

@@ -113,6 +113,11 @@ def normalize_cdr_payload(
return None, "malformed_json", None, None
raw_id = payload.get("raw_id")
raw_id_str = raw_id if isinstance(raw_id, str) else None
if raw_id_str is not None:
try:
raw_id_str.encode("utf-8")
except UnicodeError:
raw_id_str = None
try:
validate_structure(payload)
except PayloadError as exc: