Skip to content

Commit 67c90bb

Browse files
committed
add backend error heuristic for q_advanced error
1 parent 307a488 commit 67c90bb

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • server/preprocessing/other-scripts

server/preprocessing/other-scripts/utils.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ detect_error <- function(failed, service, params) {
9595
reason <- c(reason, 'API error: timeout')
9696
}
9797
}
98+
if (length(reason) == 0 && service == 'base') {
99+
# check if q_advanced is in list of params
100+
if (!is.null(params$q_advanced)) {
101+
reason <- c(reason, "API error: q_advanced")
102+
}
103+
}
98104
if (length(reason) == 0 && service == 'pubmed') {
99105
if (startsWith(failed$query_reason, "HTTP failure: 500") && grepl("error forwarding request", failed$query_reason, fixed=TRUE)){
100106
reason <- c(reason, 'API error: requested metadata size')

0 commit comments

Comments
 (0)