Skip to content

Commit

Permalink
Merge pull request #136 from Chloe070196/24.10.00_handle_eds_search_e…
Browse files Browse the repository at this point in the history
…rror

feat: error messages are specific
  • Loading branch information
Chloe070196 authored Oct 14, 2024
2 parents ccd5969 + 85fba26 commit 600bedf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions code/web/sys/SearchObject/EbscoEdsSearcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,12 @@ public function authenticate() {
return true;
} elseif ($createSessionResponse->ErrorDescription) {
$logger->log("create session failed, " . print_r($createSessionResponse, true), Logger::LOG_WARNING);
return new AspenError("Error processing search in EBSCO EDS");
return new AspenError("EBSCO EDS Authentication failed");
}
}
} else {
$logger->log("Error processing search in EBSCO EDS: " . print_r($return, true), Logger::LOG_WARNING);
return new AspenError("Error processing search in EBSCO EDS: Authentication failed");
$logger->log("EBSCO EDS Authentication failed: " . print_r($return, true), Logger::LOG_WARNING);
return new AspenError("EBSCO EDS Authentication failed");
}
} else {
return false;
Expand Down Expand Up @@ -661,12 +661,12 @@ public function processSearch($returnIndexErrors = false, $recommendations = fal
$logger->log(print_r($curlInfo(true)), Logger::LOG_WARNING);
}
$this->lastSearchResults = false;
return new AspenError("Error processing search in EBSCO EDS");
return new AspenError("Could not process search in EBSCO EDS");
}
} catch (Exception $e) {
global $logger;
$logger->log("Error loading data from EBSCO $e", Logger::LOG_ERROR);
return new AspenError("Error loading data from EBSCO $e");
$logger->log("Error loading data from EBSCO EDS: $e", Logger::LOG_ERROR);
return new AspenError("Could not load data from EBSCO EDS");
}
}

Expand Down

0 comments on commit 600bedf

Please sign in to comment.