Skip to content

Commit 93caf94

Browse files
committed
bug #458 [Store] Fix Weaviate handling during drop (Guikingone)
This PR was merged into the main branch. Discussion ---------- [Store] Fix Weaviate handling during drop | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Docs? | no | Issues | Related to #335 | License | MIT Small fix regarding the handling of `drop` (empty content). Commits ------- a982fe6 fix(store): weaviate
2 parents d49ae7c + a982fe6 commit 93caf94

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/store/src/Bridge/Weaviate/Store.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,13 @@ private function request(string $method, string $endpoint, array $payload): arra
9898
$finalPayload['json'] = $payload;
9999
}
100100

101-
$result = $this->httpClient->request($method, $url, $finalPayload);
101+
$response = $this->httpClient->request($method, $url, $finalPayload);
102102

103-
return $result->toArray();
103+
if (200 === $response->getStatusCode() && '' === $response->getContent(false)) {
104+
return [];
105+
}
106+
107+
return $response->toArray();
104108
}
105109

106110
/**

0 commit comments

Comments
 (0)