Skip to content

fix create_datastore_script function#147

Merged
RobLBaker merged 22 commits into
DOI-NPS:masterfrom
RobLBaker:master
Jan 23, 2026
Merged

fix create_datastore_script function#147
RobLBaker merged 22 commits into
DOI-NPS:masterfrom
RobLBaker:master

Conversation

@RobLBaker
Copy link
Copy Markdown
Member

@RobLBaker RobLBaker commented Jan 5, 2026

closes #146

Updated create_datastore_script function to play well with DataStore v8 API; also improved formatting of text printed to the screen and made the DataStore reference link printed to the screen clickable.

This PR also closes #148
It allows the user to set the for_or_by_NPS flag (default = TRUE)

this PR now also partially addresses #143

@RobLBaker RobLBaker self-assigned this Jan 5, 2026
@RobLBaker RobLBaker added the bug Something isn't working label Jan 5, 2026
@RobLBaker RobLBaker requested a review from wright13 January 20, 2026 19:05
#check status code; suggest logging in to VPN if errors occur:
status_code <- httr::stop_for_status(contacts_req)$status_code
if (!status_code == 200) {
stop("ERROR: DataStore connection failed. Are you logged in to the VPN?\n")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly worth changing the wording of these error messages, as a non-200 status could be a lot of things besides failed connection. It'll be a moot point whenever we refactor to use NPSdatastore though, so I'm also ok with leaving it as-is for now.

Copy link
Copy Markdown
Collaborator

@wright13 wright13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment on error message phrasing, otherwise looks good

@RobLBaker RobLBaker merged commit c64d637 into DOI-NPS:master Jan 23, 2026
0 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

create_datastore_script should set origination flag on DataStore DataStore API v8 broke create_datastore_script function

2 participants