posit-dev / posit-dev/connectapi

chore: move `error_if_less_than()` calls to client methods

Open
#403 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

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.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.