On This Page

SupervisorError

Class in Errors · JavaScript & TypeScript

Parent-process lifecycle failure, not the child's original client or configuration error

The message and details exclude child output, environment, arguments and operating-system error text. A spawn failure keeps the original operating-system error as cause, which can name the entry path. A failing start or waitForClose settles only after owned child processes exit

class SupervisorError extends FluxerlyErrorclass SupervisorError
  extends FluxerlyError

Constructor#

Construct a lifecycle failure from a safe child identifier and category

new SupervisorError(
    childId: string | null,
    reason:
        | "closed" | "shardCount" | "spawn" | "protocol"
        | "restartLimit" | "startupTimeout",
    options?: { readonly cause?: unknown }
): SupervisorErrornew SupervisorError(
  childId: string | null,
  reason:
    | "closed" | "shardCount"
    | "spawn" | "protocol"
    | "restartLimit"
    | "startupTimeout",
  options?: {
    readonly cause?: unknown
  }
): SupervisorError

Parameters

childId

Child whose local lifecycle failed, when one is applicable

string | null
reason

The reason closed means the lifetime ended or coordination was lost

The reason spawn means a launch or IPC-send failure. The reason protocol means invalid coordination data. The reason restartLimit means the child exhausted its replacement budget. The reason startupTimeout means a child did not acknowledge assignment and configuration within its startup budget. The reason shardCount means the community count for totalShards "auto" failed, with that failure as the cause

| "closed" | "shardCount" | "spawn" | "protocol" | "restartLimit"
| "startupTimeout"| "closed" | "shardCount" | "spawn"
| "protocol" | "restartLimit"
| "startupTimeout"
options optional

Optional underlying failure retained as the error's cause

{ readonly cause?: unknown }

Properties#

_tag#

Discriminator for this SDK failure

readonly _tag: "SupervisorError"

childId#

Child whose local lifecycle failed, when one is applicable

readonly childId: string | null

reason#

The reason closed means the lifetime ended or coordination was lost

The reason spawn means a launch or IPC-send failure. The reason protocol means invalid coordination data. The reason restartLimit means the child exhausted its replacement budget. The reason startupTimeout means a child did not acknowledge assignment and configuration within its startup budget. The reason shardCount means the community count for totalShards "auto" failed, with that failure as the cause

readonly reason:
    | "closed" | "shardCount" | "spawn" | "protocol"
    | "restartLimit" | "startupTimeout"readonly reason:
  | "closed" | "shardCount"
  | "spawn" | "protocol"
  | "restartLimit"
  | "startupTimeout"

Inherited#

Inherited from FluxerlyError: code, details, hint, toJSON