Skip to content

Commit

Permalink
return of the walrus
Browse files Browse the repository at this point in the history
  • Loading branch information
hemidactylus committed Feb 4, 2025
1 parent f2bfec0 commit 364bea4
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions libs/astradb/langchain_astradb/vectorstores.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,8 @@ def _insertmany_error_message(err: InsertManyException) -> str:
for edesc in filtered_error_descs[:MAX_SHOWN_INSERTION_ERRORS]
)

if len(filtered_error_descs) > MAX_SHOWN_INSERTION_ERRORS:
err_msg += (
f". (Note: {len(filtered_error_descs) - MAX_SHOWN_INSERTION_ERRORS}"
" further errors omitted.)"
)
if (num_residual := len(filtered_error_descs) - MAX_SHOWN_INSERTION_ERRORS) > 0:
err_msg += f". (Note: {num_residual} further errors omitted.)"

err_msg += (
" (Full API error in '<this-exception>.__cause__.error_descriptors'"
Expand Down

0 comments on commit 364bea4

Please sign in to comment.