Can't mark request as failed

Hello,
I am trying to mark a request as failed using crawlee + playwright.

I tried multiple things, from throwing exceptions to use request.pushErrorMessage() method. The session.retire() is working for marking the session as bad, but not for mark the request as failed:

await session.retire();
await request.pushErrorMessage(new Error("Captcha detected"));
return;


With the previous code, I get
Terminal status message: Finished! Total 1 requests: 1 succeeded, 0 failed.
When I expect it to fail and retry

Throwing directly an exception also does not work
new Error("Captcha detected")

There is a similar issue solved using Apify actor, but in this case I do not have access to it as I am using vanila Crawlee
https://discord.com/channels/801163717915574323/1105228219013140480/1115869864268152852
Was this page helpful?