From 5fe7313fa41a71f3c39db0ba730c350d15c554f0 Mon Sep 17 00:00:00 2001 From: Steve Dudenhoeffer Date: Sun, 12 Oct 2025 20:17:04 -0400 Subject: [PATCH] Refine status check logic when handling document requests in Playwright --- playwright.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/playwright.go b/playwright.go index 99ddf0b..e462738 100644 --- a/playwright.go +++ b/playwright.go @@ -296,10 +296,7 @@ func (b playWrightBrowser) openPage(_ context.Context, target string, opts OpenP slog.Info("opened document", "url", target, "status", resp.Status(), "request", resp.Request()) - if resp.Status() != 200 { - time.Sleep(999 * time.Hour * 24) - time.Sleep(25 * time.Second) - + if resp.Status() < 200 || resp.Status() >= 300 { _ = page.Close() if resp.Status() == 404 {