Closed mbojan closed 8 years ago
Ah, there is handle_errors
...
Sorry!
Actually, I think this could be improved:
handle_errors
takes XML as a character vector, parses it with read_xml
to check for <error>
tag. The XML is then parsed again outside of handle_errors
in both get_record
and while_oai
. This seems inefficient.xml2::read_xml
trips over (it is actually libxml
that throws an error). I think requesting raw results could (optionally?) work with text without XML parsing.That sounds good, the change to handle_errors()
Closing because handle_errors
has been updated. Discussion of other ideas moved largely to #17
https://www.openarchives.org/OAI/openarchivesprotocol.html#ErrorConditions
I think currently only HTTP errors are handled through
httr::stop_for_status
inwhile_oai
.