Skip to content

Commit

Permalink
refactor(list_operator): replace ValueError with InvalidKeyError (#10222
Browse files Browse the repository at this point in the history
)
  • Loading branch information
laipz8200 authored Nov 4, 2024
1 parent 38bca67 commit 9369cc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/core/workflow/nodes/list_operator/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")

0 comments on commit 9369cc4

Please sign in to comment.