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 {