Skip to content

Commit

Permalink
improve wording on error message on partitions + limit (#1768)
Browse files Browse the repository at this point in the history
  • Loading branch information
haakonvt committed May 16, 2024
1 parent efd4e69 commit 2b1a089
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cognite/client/_api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,9 @@ def _list(
verify_limit(limit)
if partitions:
if not is_unlimited(limit):
raise ValueError("When using partitions, limit should be `None`, `-1` or `inf`.")
raise ValueError(
"When using partitions, a finite limit can not be used. Pass one of `None`, `-1` or `inf`."
)
if sort is not None:
raise ValueError("When using sort, partitions is not supported.")
return self._list_partitioned(
Expand Down

0 comments on commit 2b1a089

Please sign in to comment.