Skip to content

Docs: add Actor lifecycle methods and status message documentation #591

Description

@TC-MO

Problem

The JS SDK docs are missing proper documentation for two related Actor runtime features that are well-documented in the Python SDK:

1. Actor lifecycle methods (Actor.init / Actor.exit)

The JS SDK shows these in code examples but never explains what they do. The Python SDK has a dedicated Actor lifecycle section covering initialization, cleanup, context managers, and the two control patterns.

Related: apify/apify-docs#670.

2. Run status messages (Actor.setStatusMessage)

Platform docs and API docs are covered (apify/apify-docs PRs #483, #632, #725, #1120), but the JS SDK has no equivalent to the Python SDK's dedicated Status Messages section with usage examples and best practices.

Related: apify/apify-docs#400 (JS SDK gap only — platform/API docs are done).

Expected outcome

JS SDK docs should include:

  • What Actor.init() and Actor.exit() do and when to call them
  • Actor.main() as a convenience wrapper
  • How to set and update run status messages with Actor.setStatusMessage()
  • Practical examples for each

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation.t-toolingIssues with this label are in the ownership of the tooling team.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions