Skip to content

Commit

Permalink
address comments left by @mdellabitta on #597 (JHN Fixes);
Browse files Browse the repository at this point in the history
  • Loading branch information
ellipsis-dev[bot] authored Dec 4, 2024
1 parent e19742a commit d6d89f3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class OaiMultiPageResponseBuilder(
Thread.sleep(sleep)
logger.info("Loading page from: " + url.toString)
val page = HttpUtils.makeGetRequest(url)
if (OAI_ERROR_PATTERN.matches(page)) {
if (OAI_ERROR_PATTERN.findFirstMatchIn(page).isDefined) {
val xml = OaiXmlParser.parsePageIntoXml(OaiPage(page))
val errorCode = xml \ "error" \@ "code"
Left(OaiError.errorForCode(errorCode))
Expand Down

0 comments on commit d6d89f3

Please sign in to comment.