Skip to content

Commit c2eec6d

Browse files
authored
Aggregate operation is throwing MongoExecutionTimeoutException in prod which is not getting caught and logged (#218)
1 parent 049e1bf commit c2eec6d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

document-store/src/main/java/org/hypertrace/core/documentstore/mongo/query/MongoQueryExecutor.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import static org.hypertrace.core.documentstore.mongo.query.parser.MongoSortTypeExpressionParser.getSortClause;
2424

2525
import com.mongodb.BasicDBObject;
26-
import com.mongodb.MongoCommandException;
2726
import com.mongodb.ServerAddress;
2827
import com.mongodb.ServerCursor;
2928
import com.mongodb.client.AggregateIterable;
@@ -181,7 +180,7 @@ public MongoCursor<BasicDBObject> aggregate(
181180
.allowDiskUse(true);
182181

183182
return iterable.cursor();
184-
} catch (final MongoCommandException e) {
183+
} catch (final Exception e) {
185184
log.error("Execution failed for query: {}. Aggregation Pipeline: {}", query, pipeline);
186185
throw e;
187186
}

0 commit comments

Comments
 (0)