André MácolaA
Apify & Crawlee6mo ago
6 replies
André Mácola

Skip request in preNavigationHooks

is it possible to skip que request for url in preNavigationHooks ? I don't want to do the request at all in request handler if something occurs in preNavigationHooks. The only thing that worked for me is throwing a NonRetryableError but I think this is not ideal.

The request.skipNavigation is not ideal because the request itself still occurs.

ATM I'm using NonRetryableError but my logs are ugly. How do I suppress the logs?

And I think too many NonRetryableError will cause Crawlee to fail?
Solution
hmmm I like the idea with SKIP label.. I'll try that. Thanks
Was this page helpful?