Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use correct classed error for "same name, different user" case #808

Merged
merged 5 commits into from
Nov 22, 2023

Conversation

juliasilge
Copy link
Member

Closes #807

When a user was trying to write a new pin that had the same name as an existing pin belonging to a different user, we weren't correctly adding class = "pins_pin_missing" to get the right behavior in the tryCatch():

pins-r/R/board_connect.R

Lines 276 to 278 in ed3ac3b

pins_pin_missing = function(e) {
rsc_content_create(board, name, metadata, access_type = access_type)$guid
}

This PR adds the correct classed condition.

@juliasilge juliasilge marked this pull request as ready for review November 15, 2023 23:08
@juliasilge
Copy link
Member Author

@stevenolen Would you be up for installing this PR and trying again the code that you had trouble with? You can install with devtools::install_github("rstudio/pins-r@fix-error-class").

This PR should fix the situation where you, for example, write your own pin named "steve.nolen/test". You will still see an error if you try to write a pin named "test"; I think we want to keep that an error for now.

@juliasilge juliasilge merged commit babdcc8 into main Nov 22, 2023
14 checks passed
@juliasilge juliasilge deleted the fix-error-class branch November 22, 2023 17:25
Copy link

github-actions bot commented Dec 7, 2023

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem looking up pins on Connect with duplicate names
1 participant