Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Reject `limit=0` in paginated requests

Open Beginner friendly
#655 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 4 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
api

Research direction

Start with BaseWSGIApp._get_slice() in server/app/interfaces/base.py and the existing negative-limit handling. Add a limit=0 case to TestPagination in server/test/interfaces/test_base.py, then run that test. Done means zero is rejected with 400 Bad Request and the pagination tests pass.

Written by the indexing model from the issue text.

Description

bug server Specification

Currently, BaseWSGIApp._get_slice() accepts limit=0, because it parses limit as a NonNegativeInteger. With limit=0, the server returns an empty page together with a cursor pointing to the same position as the request. For example, GET /shells?limit=0 on a non-empty repository returns:

{"paging_metadata":{"cursor":"1"},"result":[]}

A client that follows the cursor until it becomes None therefore loops forever.

The specification (IDTA-01002-3-1, v3.1.2) contradicts itself on whether limit=0 is valid:

To me, a page size of 0 is no meaningful behavior as it cannot make progress through a result set.
Rejecting it is the only sensible option, and it matches the OpenAPI definition.

_get_slice() should reject limit=0 with 400 Bad Request, the same way it already rejects negative values. A test for this case should be added to TestPagination in server/test/interfaces/test_base.py.

Dominant language
Python
Stars
104
Forks
56
Avg merge
12d 13h
Merged PRs (30d)
5

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from eclipse-basyx/basyx-python-sdk

All issues in eclipse-basyx/basyx-python-sdk

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.