Skip to content

Commit

Permalink
Now we only suppress the 'index_not_found' message now (#234)
Browse files Browse the repository at this point in the history
The new added error `ConflictOperationError` will be raised as MarqoWebError
  • Loading branch information
wanliAlex authored May 22, 2024
1 parent 4de18d4 commit d026a7b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/marqo/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,10 @@ def delete_index(self, index_name: str, wait_for_readiness=True) -> Dict[str, An
cloud_wait_for_index_status(self.http, index_name, enums.IndexStatus.DELETED)
return res
except errors.MarqoWebError as e:
return e.message
if "index_not_found" in str(e):
return e.message
else:
raise e

def get_index(self, index_name: str) -> Index:
"""Get the index.
Expand Down

0 comments on commit d026a7b

Please sign in to comment.