molgenis / molgenis-r-datashield

Armadillo implementation of DSI to be DataSHIELD ready, part of the MOLGENIS suite
https://molgenis.github.io/molgenis-r-datashield/
0 stars 3 forks source link

fix: return correct error message when workspace doesn't exist #88

Closed timcadman closed 3 months ago

timcadman commented 3 months ago

To test

Specify URL, either using Armadillo running locally url <- "http://localhost:8080/"

or use the demo server url <- "https://armadillo-demo.molgenis.net/"

Get token and build login object:

token <- armadillo.get_token(url)

builder <- newDSLoginBuilder()
builder$append(
  url = url,
  server = "armadillo",
  token = token,
  table = "project-1/data/nonrep",
  driver = "ArmadilloDriver")

logindata <- builder$build()

Try to log in to a workspace that doesn't exist: conns <- DSI::datashield.login(logins = logindata, restore = "workspace_does_not_exist")

Check that the following error message is received: Error: Internal server error: Something went wrong while reading/writing in the storage

In addition: Run devtools::check()

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.3%. Comparing base (453dd03) to head (1675a1d).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #88 +/- ## ====================================== Coverage 97.3% 97.3% ====================================== Files 5 5 Lines 304 304 ====================================== Hits 296 296 Misses 8 8 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.