The currently used approach to check potential researchIDs for validity against "http://publons.com/researcher/" can be slow and seems to become throttled when used extensively via tests.
Unfortunately using the publons API seems to come with different limitations, one of which is that by default only 100 requests are permitted per day which again might be an issue when running a lot of tests during development.
In any case authorWarnings should be refactored. It should only contain formal authorID syntax checks, the requests against the ORCID and publons services should be moved to its own function.
The new function should specifically address and handle potential http.Get timeouts to avoid Server stall or, even worse, panic.
The currently used approach to check potential researchIDs for validity against "http://publons.com/researcher/" can be slow and seems to become throttled when used extensively via tests.
Unfortunately using the publons API seems to come with different limitations, one of which is that by default only 100 requests are permitted per day which again might be an issue when running a lot of tests during development.
In any case
authorWarnings
should be refactored. It should only contain formal authorID syntax checks, the requests against the ORCID and publons services should be moved to its own function.The new function should specifically address and handle potential http.Get timeouts to avoid Server stall or, even worse, panic.