posit-dev / posit-dev/connectapi
refactor: remove __ping__ request
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 54
- Forks
- 27
- Avg merge
- 1d 3m
- Merged PRs (30d)
- 1
Description
check_connect_license() calls the __ping__ endpoint and looks for 402 response to indicate that the license is not valid. But we don't need to do that because any request will error that way if the license is invalid. So just move the special messaging for 402 errors into Connect$raise_error() and delete this unnecessary server request.
Also delete the various __ping__.json test mock files, as they are no longer needed.
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
Start in R/utils.R at check_connect_license() and in R/connect.R at Connect$raise_error() to trace the current 402 handling. Remove the ping request, centralize its special messaging in raise_error(), and delete the various ping.json test mock files. Done means invalid-license errors retain the special message without an extra request and the affected tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- api, testing
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100