Skip to content

Commit acb1bcd

Browse files
committed
Fix document import error
1 parent 490f220 commit acb1bcd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Typesense.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public function importDocuments(Collection $collectionIndex, $documents, string
167167

168168
$result = [];
169169
foreach ($importedDocuments as $importedDocument) {
170-
if ($importedDocument["code"] !== 200) {
170+
if (!$importedDocument['success']) {
171171
throw new TypesenseClientError("Error importing document: ${importedDocument['error']}");
172172
}
173173

0 commit comments

Comments
 (0)