Skip to content

Commit

Permalink
Fix lint warning
Browse files Browse the repository at this point in the history
  • Loading branch information
elie222 committed Jan 2, 2025
1 parent ff0b1f8 commit bac227e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/web/utils/ai/choose-rule/match-rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ import { aiChooseRule } from "@/utils/ai/choose-rule/ai-choose-rule";
import { getEmailFromMessage } from "@/utils/ai/choose-rule/get-email-from-message";
import { isReplyInThread } from "@/utils/thread";
import type { UserAIFields } from "@/utils/llms/types";
import { createScopedLogger } from "@/utils/logger";

const logger = createScopedLogger("match-rules");

// if we find a match, return it
// if we don't find a match, return the potential matches
Expand Down Expand Up @@ -177,7 +180,7 @@ export function matchesStaticRule(
try {
return new RegExp(pattern).test(text);
} catch (error) {
console.error(`Invalid regex pattern: ${pattern}`, error);
logger.error("Invalid regex pattern", { pattern, error });
return false;
}
};
Expand Down

1 comment on commit bac227e

@vercel
Copy link

@vercel vercel bot commented on bac227e Jan 2, 2025

Choose a reason for hiding this comment

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

Please sign in to comment.