Describe the bug
Calling "peek" on a subscription with an offset of 0 results in a stacktrace
To Reproduce
- Create a non-partitioned topic.
- Publish at least one message to it.
- Create a subscription on it.
- Using the management API, do
$topic/subscription/$subscription/position/0
Expected behavior
A documented error code and message are returned to the user, indicating "zero is not a valid offset".
Actual behavior
A stacktrace and 500 error are returned.
Pulsar 2.9.1 on MacOS.