Skip to content

Commit

Permalink
add error message if sciwheel authentication fails
Browse files Browse the repository at this point in the history
  • Loading branch information
gabora authored Jan 8, 2025
1 parent 454b710 commit d50415d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bot.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ lastDates <- webhooks %>% pmap_dbl(\(...) {
add_headers(Authorization = paste("Bearer", f1000auth))
)
print(paste(
Sys.time(), "channel", current$channel, "GET status",
"Sciwheel: ", Sys.time(), "channel", current$channel, "GET status",
resp$status_code
))

Expand Down Expand Up @@ -143,7 +143,9 @@ lastDates <- webhooks %>% pmap_dbl(\(...) {

print(paste(Sys.time(), "POST status", paste(respcodes, collapse = ", ")))
}
}
}else{
stop("Sciwheel authentication failed, check the status code. If status code is 401, then someone needs to generate new sciwheel authentication token and update the github secret (f1000token).")
}
templastDate
})

Expand Down

0 comments on commit d50415d

Please sign in to comment.