Improve actor run status messages to inform why the crawl finished
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
We could also propagate the original error message into the status:
Yeah, definitely
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).