""" What a member is told when the media tools fail: that it failed. An exception's text from ffmpeg or ffprobe names the operator's paths, versions and the libraries the build has; the member who asked needs none of it, and the operator finds it in their log. Read from the source, because what matters is that no reply in these handlers carries an exception's text at all. """ import re from pathlib import Path APPS = Path(__file__).resolve().parents[1] / "src" / "meshbay_node" / "transport" / "webrtc" def test_no_reply_to_a_member_carries_an_exceptions_text(): offenders = [] for path in APPS.rglob("*.py"): text = path.read_text(encoding="utf-8") for m in re.finditer(r'"detail":\s*(f"[^"]*\{e\}[^"]*"|str\(e\))', text): offenders.append(f"{path.name}: {m.group(0)}") assert not offenders, offenders