Skip to content

Conversation

@GromNaN
Copy link
Member

@GromNaN GromNaN commented Nov 5, 2025

Copilot AI review requested due to automatic review settings November 5, 2025 19:13
@GromNaN GromNaN requested a review from a team as a code owner November 5, 2025 19:13
@GromNaN GromNaN requested a review from jmikola November 5, 2025 19:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a more specific exception (SearchNotSupportedException) to handle Atlas Search-related errors that occur during aggregation operations. The change improves error handling by catching generic server exceptions and re-throwing them as a more specific exception type when they relate to unsupported search functionality.

  • Created a new SearchNotSupportedException class to identify and handle search-related server errors
  • Modified the Aggregate operation to catch and re-throw search-specific exceptions during command execution

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/Exception/SearchNotSupportedException.php New exception class that extends ServerException and provides logic to identify search-related errors based on error codes
src/Operation/Aggregate.php Added try-catch block to intercept ServerException and re-throw as SearchNotSupportedException when appropriate

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov-commenter
Copy link

codecov-commenter commented Nov 5, 2025

Codecov Report

❌ Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.60%. Comparing base (c9ddfcb) to head (604ef77).
⚠️ Report is 10 commits behind head on v2.x.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/Exception/SearchNotSupportedException.php 90.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               v2.x    #1794      +/-   ##
============================================
- Coverage     87.73%   86.60%   -1.13%     
- Complexity     3194     3199       +5     
============================================
  Files           424      425       +1     
  Lines          6352     6310      -42     
============================================
- Hits           5573     5465     -108     
- Misses          779      845      +66     
Flag Coverage Δ
6.0-replica_set 85.72% <93.33%> (+0.03%) ⬆️
6.0-server 81.72% <93.33%> (+0.02%) ⬆️
6.0-sharded_cluster ?
8.0-replica_set ?
8.0-server 82.56% <93.33%> (-0.03%) ⬇️
8.0-sharded_cluster ?

Flags with carried forward coverage won't be shown. Click here to find out more.

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

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.

2 participants