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:
20
20
httr,
21
21
jsonlite,
22
22
lubridate,
23
- stringr
23
+ stringr,
24
+ cli
24
25
Suggests:
25
26
knitr,
26
27
rmarkdown,
Original file line number Diff line number Diff line change @@ -92,10 +92,10 @@ dst_get_data <- function(table,
92
92
93
93
# Make sure the returned status is OK
94
94
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'}} " )
97
97
} 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.
99
99
Please make sure that the table is in `tables`" )
100
100
} else if (httr :: status_code(dst_data ) != 200 ) {
101
101
stop(httr :: content(dst_data , encoding = " UTF-8" )$ message )
You can’t perform that action at this time.
0 commit comments