diff --git a/packages/core/components/AggregateInfoBox/index.tsx b/packages/core/components/AggregateInfoBox/index.tsx
index 628115d1b..ad48af49c 100644
--- a/packages/core/components/AggregateInfoBox/index.tsx
+++ b/packages/core/components/AggregateInfoBox/index.tsx
@@ -46,11 +46,24 @@ export default function AggregateInfoBox() {
setLoading(false);
setError(undefined);
}
- } catch (requestError) {
+ } catch (err) {
if (!ignoreResponse) {
- setError(
- `Whoops! Couldn't get aggregate information for some reason. ${requestError}`
- );
+ // If the selection was large and the server had an internal failure
+ // we likely just can't compile the data
+ if (
+ (err as Error).message?.includes("Internal Server Error") &&
+ fileSelection.count() > 10_000
+ ) {
+ setAggregateData(undefined);
+ setLoading(false);
+ setError(undefined);
+ } else {
+ setError(
+ `Whoops! Couldn't get aggregate information for some reason. ${
+ (err as Error).message
+ }`
+ );
+ }
}
}
};
@@ -80,19 +93,21 @@ export default function AggregateInfoBox() {
Total Files
Selected
-