On This Page

ShardConnectionError

Class in Errors · JavaScript & TypeScript

A configured gateway shard failed startup or permanently lost its established connection

Use shardId to identify the local connection and failure to inspect its expected cause, which is also the error's cause. The client waits for its other shards to clean up before returning this failure. This does not undo delivered events or dispatched HTTP work

class ShardConnectionError extends FluxerlyErrorclass ShardConnectionError
  extends FluxerlyError

Constructor#

new ShardConnectionError(
    shardId: number,
    failure:
        | ConnectionError | ConnectionTimeoutError | RateLimitError
        | AuthenticationError
): ShardConnectionErrornew ShardConnectionError(
  shardId: number,
  failure:
    | ConnectionError
    | ConnectionTimeoutError
    | RateLimitError
    | AuthenticationError
): ShardConnectionError

Parameters

shardId

The locally assigned shard whose connection failed

number
failure

Original SDK-owned expected failure, without private upstream payloads

| ConnectionError | ConnectionTimeoutError | RateLimitError
| AuthenticationError| ConnectionError
| ConnectionTimeoutError
| RateLimitError | AuthenticationError

Properties#

_tag#

Discriminator for narrowing a failure attributed to one local shard

readonly _tag: "ShardConnectionError"

failure#

Original SDK-owned expected failure, without private upstream payloads

readonly failure:
    | ConnectionError | ConnectionTimeoutError | RateLimitError
    | AuthenticationErrorreadonly failure:
  | ConnectionError
  | ConnectionTimeoutError
  | RateLimitError
  | AuthenticationError

shardId#

The locally assigned shard whose connection failed

readonly shardId: number

Inherited#

Inherited from FluxerlyError: code, details, hint, toJSON