Skip to content
Snippets Groups Projects
Commit c7ad4f51 authored by Vaclav Rosecky's avatar Vaclav Rosecky Committed by Demian Katz
Browse files

log failed DLF requests

parent cc761f51
No related merge requests found
...@@ -519,6 +519,8 @@ class Aleph extends AbstractBase implements \Zend\Log\LoggerAwareInterface, ...@@ -519,6 +519,8 @@ class Aleph extends AbstractBase implements \Zend\Log\LoggerAwareInterface,
$replyCode = (string) $result->{'reply-code'}; $replyCode = (string) $result->{'reply-code'};
if ($replyCode != "0000") { if ($replyCode != "0000") {
$replyText = (string) $result->{'reply-text'}; $replyText = (string) $result->{'reply-text'};
$this->logger->err("DLF request failed", array('url' => $url,
'reply-code' => $replyCode, 'reply-message' => $replyText));
$ex = new AlephRestfulException($replyText, $replyCode); $ex = new AlephRestfulException($replyText, $replyCode);
$ex->setXmlResponse($result); $ex->setXmlResponse($result);
throw $ex; throw $ex;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment