From 9369cc44e615506f3b8ce6a22a7784671a7d2667 Mon Sep 17 00:00:00 2001 From: -LAN- Date: Mon, 4 Nov 2024 15:23:08 +0800 Subject: [PATCH] refactor(list_operator): replace ValueError with InvalidKeyError (#10222) --- api/core/workflow/nodes/list_operator/node.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/core/workflow/nodes/list_operator/node.py b/api/core/workflow/nodes/list_operator/node.py index 6053a15d96..0406b97eb8 100644 --- a/api/core/workflow/nodes/list_operator/node.py +++ b/api/core/workflow/nodes/list_operator/node.py @@ -295,4 +295,4 @@ def _order_file(*, order: Literal["asc", "desc"], order_by: str = "", array: Seq extract_func = _get_file_extract_number_func(key=order_by) return sorted(array, key=lambda x: extract_func(x), reverse=order == "desc") else: - raise ValueError(f"Invalid order key: {order_by}") + raise InvalidKeyError(f"Invalid order key: {order_by}")