Skip to content

Commit

Permalink
feat: try-catch handling for adblocker in core
Browse files Browse the repository at this point in the history
  • Loading branch information
amhsirak committed Dec 22, 2024
1 parent 584433e commit 58f92a3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion maxun-core/src/interpret.ts
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,11 @@ export default class Interpreter extends EventEmitter {
const workflowCopy: Workflow = JSON.parse(JSON.stringify(workflow));

// apply ad-blocker to the current page
await this.applyAdBlocker(p);
try {
await this.applyAdBlocker(p);
} catch (error) {
this.log(`Failed to apply ad-blocker: ${error.message}`, Level.ERROR);
}
const usedActions: string[] = [];
let selectors: string[] = [];
let lastAction = null;
Expand Down

0 comments on commit 58f92a3

Please sign in to comment.