Skip to content

Commit a982fe6

Browse files
committed
fix(store): weaviate
1 parent d49ae7c commit a982fe6

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)