Skip to content

Commit 03c3129

Browse files
committed
Fix so response includes error message
1 parent 9a620b5 commit 03c3129

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Response.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ public function __construct($text, &$client = null)
6060
$this->records[] = new Record($record);
6161
}
6262

63+
$e = $doc->first('/srw:searchRetrieveResponse/srw:diagnostics');
64+
if ($e) {
65+
$this->error = $e->text('d:diagnostic/d:messsage') . ' : ' . $e->text('d:diagnostic/d:details');
66+
}
67+
6368
$this->client = $client;
6469

6570
// The server may echo the request back to the client along with the response

0 commit comments

Comments
 (0)