diff --git a/src/Driver/OpenSearch/OpenSearch.php b/src/Driver/OpenSearch/OpenSearch.php index 30bebef..6db43f7 100644 --- a/src/Driver/OpenSearch/OpenSearch.php +++ b/src/Driver/OpenSearch/OpenSearch.php @@ -177,10 +177,9 @@ public function delete(ModelInterface $model): bool $this->buildUrl($model::getName(), "_doc", $model->getId()) ); } catch (HttpErrorResponseException $e) { - if ($e->getCode() === 404) { - return false; + if ($e->getCode() !== 404) { + throw $e; } - throw $e; } return true;