Closed ezraporter closed 1 year ago
This also removes the custom error message for deleted REDCap projects introduced in https://github.com/CHOP-CGTInformatics/REDCapTidieR/pull/156. When regenerating the mocks I was not able to reproduce this error message with REDCapR 1.1.0 or 1.2.0. My guess is that this is due to updates to the CHOP REDCap instance which means checking for deleted as opposed to nonexistent REDCap projects is likely too fragile.
So what is the behavior now when a deleted project is called? The tryCatch generic message?
This also removes the custom error message for deleted REDCap projects introduced in #156. When regenerating the mocks I was not able to reproduce this error message with REDCapR 1.1.0 or 1.2.0. My guess is that this is due to updates to the CHOP REDCap instance which means checking for deleted as opposed to nonexistent REDCap projects is likely too fragile.
So what is the behavior now when a deleted project is called? The tryCatch generic message?
It will probably depend on your institution's REDCap instance but for CHOP it's returning 403
so we get this one: https://github.com/CHOP-CGTInformatics/REDCapTidieR/blob/82c8b8a67cdf59db9ac492208669e5218ad87553/R/utils.R#L645-L651
If I recall correctly, we were previously getting 404
with the message The REDCap project no longer exists because it was deleted
although I can't recreate that to be sure. If a user gets that response they'll get that The REDCap project no longer exists...
message in the error from REDCapTidieR
.
Got it thanks, I forgot we had updated the error message defaults to return what the REDCap API returns. In that case I think this should be good, in general it should be relatively rare that a read_redcap()
call gets made against a deleted database. Only time I can see it popping up is for routine calls that are left on a schedule.
See what Will says but otherwise I think this looks fine.
@rsh52 this is ready for review. I made the following changes:
pkgdown
site.lintr
and styler
in renv.lock
Description
This PR regenerates the
httptest
mocks to be compatible with the latest version ofREDCapR
. Currently ourrenv.lock
points towards the dev version ofREDCapR
but I imagine we won't push this untilREDCapR 1.2.0
is on CRAN at which point we'll change that.This also removes the custom error message for deleted REDCap projects introduced in #156. When regenerating the mocks I was not able to reproduce this error message with
REDCapR 1.1.0
or1.2.0
. My guess is that this is due to updates to the CHOP REDCap instance which means checking for deleted as opposed to nonexistent REDCap projects is likely too fragile.Proposed Changes
List changes below in bullet format:
PR Checklist
Before submitting this PR, please check and verify below that the submission meets the below criteria:
.RDS
) updated underinst/testdata/create_test_data.R
httptest::with_mock_api
and any new mocks were added totests/testthat/fixtures/create_httptest_mocks.R
usethis::use_dev_version()
Code Review
This section to be used by the reviewer and developers during Code Review after PR submission
Code Review Checklist