Skip to content

Commit

Permalink
Aggregate operation is throwing MongoExecutionTimeoutException in pro…
Browse files Browse the repository at this point in the history
…d which is not getting caught and logged (#218)
  • Loading branch information
mihirgt authored Jan 21, 2025
1 parent 049e1bf commit c2eec6d
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import static org.hypertrace.core.documentstore.mongo.query.parser.MongoSortTypeExpressionParser.getSortClause;

import com.mongodb.BasicDBObject;
import com.mongodb.MongoCommandException;
import com.mongodb.ServerAddress;
import com.mongodb.ServerCursor;
import com.mongodb.client.AggregateIterable;
Expand Down Expand Up @@ -181,7 +180,7 @@ public MongoCursor<BasicDBObject> aggregate(
.allowDiskUse(true);

return iterable.cursor();
} catch (final MongoCommandException e) {
} catch (final Exception e) {
log.error("Execution failed for query: {}. Aggregation Pipeline: {}", query, pipeline);
throw e;
}
Expand Down

0 comments on commit c2eec6d

Please sign in to comment.