Skip to content

Commit 086e22d

Browse files
kkopczynski-cyborgCopilot
authored andcommitted
Update cyborgdb/client/client.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 644ba06 commit 086e22d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cyborgdb/client/client.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,14 @@ def load_index(self, index_name: str, index_key: bytes) -> EncryptedIndex:
234234
# Create the EncryptedIndex instance
235235
return index
236236

237-
except Exception as e:
237+
except ApiException as e:
238238
error_msg = f"Failed to load index '{index_name}': {e}"
239239
logger.error(error_msg)
240240
raise ValueError(error_msg)
241+
except ValidationError as ve:
242+
error_msg = f"Validation error while loading index '{index_name}': {ve}"
243+
logger.error(error_msg)
244+
raise ValueError(error_msg)
241245

242246
def get_health(self) -> Dict[str, str]:
243247
"""

0 commit comments

Comments
 (0)