Skip to content

Commit b4fe80c

Browse files
committed
Show request URL on error
1 parent 0293df4 commit b4fe80c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

R/api_get.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ api_get <- function(obj) {
182182

183183
if (!jsonlite::validate(txt)) {
184184
obj <- NULL
185-
err_msg <- paste0("API response parsing failed\n", txt)
185+
err_msg <- paste("API response parsing failed", notoken, txt, sep = "\n")
186186
stop(err_msg, call. = FALSE)
187187
}
188188

@@ -193,6 +193,8 @@ api_get <- function(obj) {
193193
"API request failed [",
194194
resp[["status_code"]],
195195
"]\n",
196+
notoken,
197+
"\n",
196198
parsed[["message"]]
197199
)
198200
stop(err_msg, call. = FALSE)

0 commit comments

Comments
 (0)