This thread is trying to answer question "Is there a mechanism to return a different response after a certain number of calls in a polling API?"
You can do whatever inside your route handler https://playwright.dev/docs/api/class-page#page-route-option-handler like store the time when creating the handler and inside compare the current time. Or use the 'times' option and a second handler that will take over handling the route as soon as the first handler reaches its usage limit.
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].