Skip to content
This repository has been archived by the owner on Nov 10, 2024. It is now read-only.

Commit

Permalink
rbind data.frames in error messages
Browse files Browse the repository at this point in the history
Close #788
  • Loading branch information
llrs committed Feb 15, 2024
1 parent 90e91c4 commit 5656168
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/api_v2_utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ req_errors <- function(resp) {
}

if (any(lengths(r$errors) > 1)) {
errors <- do.call(rbind, lapply(r$errors, list2DF))
if (is.data.frame(r$errors[[1]])) {
errors <- do.call(rbind, r$errors)
} else {
errors <- do.call(rbind, lapply(r$errors, list2DF))
}
} else {
errors <- r$errors
}
Expand Down

0 comments on commit 5656168

Please sign in to comment.