Refine status check logic when handling document requests in Playwright
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user