From 09df43a6753e73733c91845038c60e23ce53490d Mon Sep 17 00:00:00 2001 From: ryzendigo <48058157+ryzendigo@users.noreply.github.com> Date: Mon, 16 Mar 2026 20:43:56 +0800 Subject: [PATCH] fix: return ValueError should be raise ValueError (#22474) escape_special_characters() returns a ValueError object instead of raising it when the input path exceeds 1000 characters. The exception object gets used as a string downstream instead of triggering error handling. --- frigate/util/builtin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frigate/util/builtin.py b/frigate/util/builtin.py index aa2417a5c..42aa18c0a 100644 --- a/frigate/util/builtin.py +++ b/frigate/util/builtin.py @@ -116,7 +116,7 @@ def clean_camera_user_pass(line: str) -> str: def escape_special_characters(path: str) -> str: """Cleans reserved characters to encodings for ffmpeg.""" if len(path) > 1000: - return ValueError("Input too long to check") + raise ValueError("Input too long to check") try: found = re.search(REGEX_RTSP_CAMERA_USER_PASS, path).group(0)[3:-1]