rstudio / pins-r

Pin, discover, and share resources
https://pins.rstudio.com
Other
316 stars 62 forks source link

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

Closed juliasilge closed 1 year ago

juliasilge commented 1 year ago

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():

https://github.com/rstudio/pins-r/blob/ed3ac3b58943474c3523d6697379e93ca01e0f87/R/board_connect.R#L276-L278

This PR adds the correct classed condition.

juliasilge commented 1 year ago

@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.

github-actions[bot] commented 11 months ago

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.