Skip to content

Commit

Permalink
Fix document import error
Browse files Browse the repository at this point in the history
  • Loading branch information
hi019 committed Dec 3, 2021
1 parent 490f220 commit acb1bcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Typesense.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public function importDocuments(Collection $collectionIndex, $documents, string

$result = [];
foreach ($importedDocuments as $importedDocument) {
if ($importedDocument["code"] !== 200) {
if (!$importedDocument['success']) {
throw new TypesenseClientError("Error importing document: ${importedDocument['error']}");
}

Expand Down

0 comments on commit acb1bcd

Please sign in to comment.