From 0610b8556ae3190b291dd040eff831d5e3e90878 Mon Sep 17 00:00:00 2001 From: WebStreamr <210764791+webstreamr@users.noreply.github.com> Date: Mon, 22 Dec 2025 10:21:24 +0000 Subject: [PATCH] fix: return 400 for invalid ID instead of raising Error --- src/controller/StreamController.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controller/StreamController.ts b/src/controller/StreamController.ts index e7086ff..6d69549 100644 --- a/src/controller/StreamController.ts +++ b/src/controller/StreamController.ts @@ -35,7 +35,9 @@ export class StreamController { } else if (rawId.startsWith('tt')) { id = ImdbId.fromString(rawId); } else { - throw new Error(`Unsupported ID: ${rawId}`); + res.status(400).send(`Unsupported ID: ${rawId}`); + + return; } const ctx = contextFromRequestAndResponse(req, res);