Skip to content

Re-raise in collection.exists() if status code is not 404 - #1950

Merged
tsmith023 merged 3 commits into
mainfrom
fix/1799
Feb 18, 2026
Merged

tsmith023 merged 3 commits into
mainfrom
fix/1799

Conversation

@tsmith023

Copy link
Copy Markdown
Member

Closes #1799

@orca-security-eu orca-security-eu Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

@codecov-commenter

codecov-commenter commented Feb 18, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 73.68421% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.41%. Comparing base (6c17756) to head (965cdaa).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
weaviate/collections/collection/sync.py 20.00% 4 Missing ⚠️
mock_tests/test_collection.py 91.66% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1950   +/-   ##
=======================================
  Coverage   86.41%   86.41%           
=======================================
  Files         275      275           
  Lines       20007    20058   +51     
=======================================
+ Hits        17289    17334   +45     
- Misses       2718     2724    +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…herwise return entire schema with `True` result)
@tsmith023
tsmith023 requested a review from dirkkul February 18, 2026 13:55
@tsmith023
tsmith023 merged commit d0be93e into main Feb 18, 2026
119 of 121 checks passed
@tsmith023
tsmith023 deleted the fix/1799 branch February 18, 2026 14:16
Anai-Guo added a commit to Anai-Guo/weaviate-python-client that referenced this pull request Jul 30, 2026
The async `Collection.exists()` still had a bare `except Exception: return
False`, so a connection error, auth failure or timeout was indistinguishable
from "collection not found". PR weaviate#1950 fixed this for the sync path only.

Mirror the sync implementation: return False on 404 and re-raise anything
else. Adds a mock test covering both branches on the async client.

Fixes weaviate#2100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

collection.exists() returns false when unauthenticated or unauthorized

3 participants