crawlee icon indicating copy to clipboard operation
crawlee copied to clipboard

Improve actor run status messages to inform why the crawl finished

Open jancurn opened this issue 2 years ago • 3 comments

Which package is the feature request for? If unsure which one to select, leave blank

None

Feature

When a crawler finishes, Crawlee sets the default Actor run status message such as Finished! Total 0 requests: 0 succeeded, 0 failed.. This is not sufficient - users need to know right away why the actor finished without having to look into the log. So we should add to the status message, e.g.

Finished: reached the "Max pages" limit! Total 0 requests: 0 succeeded, 0 failed.

Motivation

Better user experience

Ideal solution or implementation, and any additional constraints

Whenever crawler terminates, ensure the status message contains the reason why, and it's set before the end.

Alternative solutions or implementations

No response

Other context

No response

jancurn avatar Jul 20 '23 09:07 jancurn

We could also propagate the original error message into the status:

CleanShot 2023-07-20 at 11 30 42

mtrunkat avatar Jul 20 '23 09:07 mtrunkat

Yeah, definitely

jancurn avatar Jul 20 '23 09:07 jancurn

We could also propagate the original error message into the status:

Yeah, but that's not really about crawlee, right? Those are coming from the platform.

We can surely improve those that are coming from the crawler code, like those around the crawling limits, or those coming from known error states (e.g. error thrown from the fail handler).

B4nan avatar Jul 20 '23 09:07 B4nan