Skip to content

Commit 9518919

Browse files
committed
error code to stx_availability()
1 parent cb31425 commit 9518919

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: standartox
2-
Version: 0.0.1.9001
3-
Date: 2021-10-02
2+
Version: 0.0.1.9002
3+
Date: 2021-10-04
44
Title: Ecotoxicological Information from the Standartox Database
55
Authors@R: c(
66
person("Andreas", "Scharmüller",

R/standartox.R

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,13 @@ stx_meta = function(vers = NULL) {
334334
#'
335335
stx_availability = function(res,
336336
http_codes = c(200, 400)) {
337-
if (inherits(res, 'try-error') || ! httr::status_code(res) %in% http_codes) {
338-
msg = '
339-
The standartox web service seems currently unavailable. Please try again after some time. Should it still not work then, please file an issue here:
340-
https://github.com/andschar/standartox/issues'
337+
if (inherits(res, 'try-error') ||
338+
! httr::status_code(res) %in% http_codes) {
339+
msg = paste0(
340+
'The standartox web service seems currently unavailable.
341+
Please try again after some time. Should it still not work then, please file an issue here:
342+
https://github.com/andschar/standartox/issues
343+
Error code: ', res)
341344
stop(msg)
342345
}
343346
}

0 commit comments

Comments
 (0)