[ENHANCEMENT]: send error message for inverted range for _all_docs as we do for _view
- Dominant language
- Erlang
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 9
Description
### Provide a brief overview of what the new feature is all about
If a `_view` has an impossible `start_key`/`end_key` combination we send a helpful error;
```
{"error":"query_parse_error","reason":"No rows can match your key range, reverse your start_key and end_key or set descending=false","ref":457284027}
```
We should do the same for `_all_docs`
### Tell us how the new feature should work. Be specific
A similar `check_range` function when parsing query params of `_all_docs` calls, returning a `400` status code and the same error reason as for `_view`.
### Not required. Suggest how to implement the addition or change
_No response_
### Additional Context
_No response_
Contributor guide
Research direction
Start with the _all_docs query-parameter parsing and compare it with the _view path, particularly the mentioned check_range behavior. Implement the same inverted start_key/end_key validation for _all_docs, returning HTTP 400 with the specified query_parse_error reason; verify both valid and inverted ranges against the existing request behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- erlang
- Domain
- api, databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100