cloudyr / pyMTurkR

A Client for the MTurk Requester API
15 stars 8 forks source link

Add warning to CreateHIT.R #22

Closed GregePorter closed 6 months ago

GregePorter commented 6 months ago

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.

When running through some test cases for some code utilizing pyMturkR, I tried to create a HIT with invalid parameters. The error I received was: $ operator is invalid for atomic vectors

With this additional warning, I see the following in the console: error

I ran R CMD check --as-cran on the package and it seems to build (aside from a latex error but I think I've seen that before on other successful cran packages I've checked).

vineetbansal commented 6 months ago

Thanks! I'll merge this, and fix the problem with the CI (unrelated to this change) in the next couple of days.