From 221ee6a1c29ec8d0c06323b2ad393b57f95bd650 Mon Sep 17 00:00:00 2001 From: Owen Date: Mon, 22 Dec 2025 14:07:49 -0500 Subject: [PATCH] Remove warning for limit --- .../auditLogs/queryRequestAnalytics.ts | 1 + .../routers/auditLogs/queryRequestAuditLog.ts | 20 ++++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/server/routers/auditLogs/queryRequestAnalytics.ts b/server/routers/auditLogs/queryRequestAnalytics.ts index cd1218ce..fe3a4c4f 100644 --- a/server/routers/auditLogs/queryRequestAnalytics.ts +++ b/server/routers/auditLogs/queryRequestAnalytics.ts @@ -105,6 +105,7 @@ async function query(query: Q) { // throw an error throw createHttpError( HttpCode.BAD_REQUEST, + // todo: is this even possible? `Too many distinct countries. Please narrow your query.` ); } diff --git a/server/routers/auditLogs/queryRequestAuditLog.ts b/server/routers/auditLogs/queryRequestAuditLog.ts index 602b4475..0513feb2 100644 --- a/server/routers/auditLogs/queryRequestAuditLog.ts +++ b/server/routers/auditLogs/queryRequestAuditLog.ts @@ -219,15 +219,17 @@ async function queryUniqueFilterAttributes( .limit(DISTINCT_LIMIT+1) ]); - if ( - uniqueActors.length > DISTINCT_LIMIT || - uniqueLocations.length > DISTINCT_LIMIT || - uniqueHosts.length > DISTINCT_LIMIT || - uniquePaths.length > DISTINCT_LIMIT || - uniqueResources.length > DISTINCT_LIMIT - ) { - throw new Error("Too many distinct filter attributes to retrieve. Please refine your time range."); - } + // TODO: for stuff like the paths this is too restrictive so lets just show some of the paths and the user needs to + // refine the time range to see what they need to see + // if ( + // uniqueActors.length > DISTINCT_LIMIT || + // uniqueLocations.length > DISTINCT_LIMIT || + // uniqueHosts.length > DISTINCT_LIMIT || + // uniquePaths.length > DISTINCT_LIMIT || + // uniqueResources.length > DISTINCT_LIMIT + // ) { + // throw new Error("Too many distinct filter attributes to retrieve. Please refine your time range."); + // } return { actors: uniqueActors