File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,8 @@ Imports:
2020 httr,
2121 jsonlite,
2222 lubridate,
23- stringr
23+ stringr,
24+ cli
2425Suggests:
2526 knitr,
2627 rmarkdown,
Original file line number Diff line number Diff line change @@ -92,10 +92,10 @@ dst_get_data <- function(table,
9292
9393 # Make sure the returned status is OK
9494 if (httr :: status_code(dst_data ) == 404 && table %in% dkstat :: tables $ id ) {
95- stop (" The resource could not be reached.
96- Please submit an issue on https://github.com/rOpenGov/dkstat/issues" )
95+ cli :: cli_abort (" The resource could not be reached.
96+ Please submit an issue on {.url {' https://github.com/rOpenGov/dkstat/issues'}} " )
9797 } else if (httr :: status_code(dst_data ) == 404 ) {
98- stop (" The resource you requested have not been found.
98+ cli :: cli_abort (" The resource you requested have not been found.
9999 Please make sure that the table is in `tables`" )
100100 } else if (httr :: status_code(dst_data ) != 200 ) {
101101 stop(httr :: content(dst_data , encoding = " UTF-8" )$ message )
You can’t perform that action at this time.
0 commit comments