From ca8aefc1ebd722a076abb21bdcaea6a1e6c7fd47 Mon Sep 17 00:00:00 2001 From: Yusuf Ali Date: Sun, 2 Feb 2025 09:32:20 -0500 Subject: [PATCH] fix(worker): missed 4xx handle for unknown method --- servc/svc/com/worker/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/servc/svc/com/worker/__init__.py b/servc/svc/com/worker/__init__.py index 7212490..eb9d335 100644 --- a/servc/svc/com/worker/__init__.py +++ b/servc/svc/com/worker/__init__.py @@ -140,7 +140,7 @@ def run_resolver( and statuscode.value >= 400 and statuscode.value < 500 ): - print("Exiting due to 5xx error", error, flush=True) + print("Exiting due to 4xx error", error, flush=True) exit(1) return statuscode, response @@ -215,6 +215,9 @@ def inputProcessor(self, message: Any) -> StatusCode: message["id"], "Method not found", StatusCode.METHOD_NOT_FOUND ), ) + if self._config.get(f"conf.{self.name}.exiton4xx"): + print("Exiting due to 4xx error:", "Method not found", flush=True) + exit(1) return StatusCode.METHOD_NOT_FOUND continueExecution = evaluate_pre_hooks(