From 32d189ed18f2b5ee4da4572918d48a7eca1f3e13 Mon Sep 17 00:00:00 2001 From: Xavier Roussel Date: Fri, 6 Dec 2024 14:53:10 +0000 Subject: [PATCH] Exclude errors from ESearchResults --- src/Resources/Extractors/EutilsEsearch.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Resources/Extractors/EutilsEsearch.php b/src/Resources/Extractors/EutilsEsearch.php index df9803e..a009c0c 100644 --- a/src/Resources/Extractors/EutilsEsearch.php +++ b/src/Resources/Extractors/EutilsEsearch.php @@ -17,6 +17,10 @@ protected function fillSearchTree(): void throw new UnparseableApiException(); } + if (array_key_exists('errorlist', $this->document['esearchresult'])) { + throw new UnparseableApiException(); + } + $this->searchTree = $this->document['esearchresult']; }