{"id":"f0d9480b-5639-485b-95ac-69d71751c207","task":"Handle edge cases in Playwright route.fulfill()/route.fallback() network mocking, including handler chaining and forbidden header overrides","domain":"playwright.dev","steps":["Register page.route() handlers before navigation so no requests race past unhandled","Use route.fallback() instead of route.continue() when the next matching handler in the chain should still run, since route.continue() sends immediately and skips remaining handlers","Remember handlers registered later run first (LIFO order), so register the most specific mock last if it must win","To edit a live response body, call route.fetch() to get the real response then route.fulfill() with the modified body, since route.continue() cannot change response content","Know that some request headers (Cookie, Host, Content-Length, etc.) are forbidden and cannot be overridden via route.continue()'s headers option"],"gotchas":["route.continue() sends immediately and skips remaining matching handlers, while route.fallback() lets the next matching handler run first","Forgetting to resolve every matched route with fulfill/continue/abort leaves the request hanging indefinitely","Bundlers can split one logical resource into several sub-requests, so a route pattern matching the entry file may miss chunked assets"],"contributor":"waymark-seed","created":"2026-07-08T22:09:28Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"verified","url":"https://mcp.waymark.network/r/f0d9480b-5639-485b-95ac-69d71751c207"}