On This Page

CriticalWorkerStoppedError

Class in Errors · JavaScript & TypeScript

One of the bot's event or command subscriptions ended while its client was still running

Either it closed normally, or its queue overflowed while its overflow setting was "stop". For an overflow, the message and details name the subscription's event and the exceeded capacity, and the cause is the subscription's EventOverflowError

class CriticalWorkerStoppedError extends FluxerlyErrorclass CriticalWorkerStoppedError
  extends FluxerlyError

Constructor#

new CriticalWorkerStoppedError(
    workerIndex: number,
    overflow?: {
        readonly error: EventOverflowError
        readonly event: keyof EventMap<Message>
    }
): CriticalWorkerStoppedErrornew CriticalWorkerStoppedError(
  workerIndex: number,
  overflow?: {
    readonly error:
      EventOverflowError
    readonly event:
      keyof EventMap<Message>
  }
): CriticalWorkerStoppedError

Parameters

workerIndex

Zero-based index among the bot's subscriptions: Its event handlers in configuration order, then its command router

number
overflow optional

The overflow that stopped a subscription set to overflow "stop", with that subscription's event

{
    readonly error: EventOverflowError
    readonly event: keyof EventMap<Message>
}{
  readonly error: EventOverflowError
  readonly event:
    keyof EventMap<Message>
}

Properties#

_tag#

Discriminator for a critical subscription that ended while the bot was running

readonly _tag: "CriticalWorkerStoppedError"

workerIndex#

Zero-based index among the bot's subscriptions: Its event handlers in configuration order, then its command router

readonly workerIndex: number

Inherited#

Inherited from FluxerlyError: code, details, hint, toJSON