feat: Handle "scope" context in error logs (#2772)

Resolves https://github.com/webrecorder/browsertrix/issues/2771

## Changes

Handles new `scope` crawl error log context.
This commit is contained in:
sua yoo 2025-07-28 23:02:23 -07:00 committed by GitHub
parent ed580c41e4
commit 1c814cad6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View File

@ -12,6 +12,7 @@ import { tw } from "@/utils/tailwind";
const labelFor: Record<CrawlLogContext, string> = {
[CrawlLogContext.General]: msg("General"),
[CrawlLogContext.Scope]: msg("Crawl Scope"),
[CrawlLogContext.Behavior]: msg("Page Behavior"),
[CrawlLogContext.BehaviorScript]: msg("Built-in Behavior"),
[CrawlLogContext.BehaviorScriptCustom]: msg("Custom Behavior Script"),
@ -21,6 +22,7 @@ const contextLevelFor: Record<CrawlLogContext, number> = {
[CrawlLogContext.Behavior]: 1,
[CrawlLogContext.BehaviorScript]: 2,
[CrawlLogContext.General]: 3,
[CrawlLogContext.Scope]: 3,
[CrawlLogContext.BehaviorScriptCustom]: 4,
};
// Minimum context level to highlight

View File

@ -256,6 +256,7 @@ export enum CrawlLogLevel {
export enum CrawlLogContext {
General = "general",
Scope = "scope",
Behavior = "behavior",
BehaviorScript = "behaviorScript",
BehaviorScriptCustom = "behaviorScriptCustom",