posit-dev / posit-dev/connectapi
chore: move `error_if_less_than()` calls to client methods
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 54
- Forks
- 27
- Avg merge
- 1d 3m
- Merged PRs (30d)
- 1
Description
The usage of error_if_less_than() is inconsistent. In some instance, it's used in functions that call Connect client methods. Elsewhere, it's called within the client methods.
In many cases, these calls should be moved into the client method, as the server version and the resulting availability of various endpoints are properties of the server itself. (If I know that a particular endpoint is not available on Connect, performing that check in the client method rather than an outer function will provide more consistent error messaging, even if the methods are called directly.)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search the R package for error_if_less_than() calls and the Connect client methods they guard. Determine which availability checks belong inside those client methods, then verify that direct and outer-function calls produce consistent errors across server versions; the issue names no specific files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- api
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100