Skip to content

Commit

Permalink
Add warning to CreateHIT.R
Browse files Browse the repository at this point in the history
Should the do.call on line 299 fail, CreateHIT will now send a warning message with the full response object. The response object contains additional error information received from mTurk
  • Loading branch information
GregePorter authored Mar 12, 2024
1 parent 17ec767 commit 7d9b9c4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions R/CreateHIT.R
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ CreateHIT <-
# Validity check
if(class(response) == "try-error") {
warning("Invalid Request")
warning(response)
} else {
HITs <- emptydf(1, 3, c("HITTypeId", "HITId", "Valid"))
HITs$HITTypeId <- response$HIT$HITTypeId
Expand Down

0 comments on commit 7d9b9c4

Please sign in to comment.