Class in Errors · JavaScript & TypeScript
Why gateway did not hand a command to the shard's connection
The reason input means the shard ID, opcode or data is malformed, cannot be encoded as JSON, or encodes to more than Fluxer's 4,096-byte message limit. The reason reserved means the opcode belongs to the SDK-managed session (heartbeat, Identify or Resume) or is a server-only opcode that Fluxer answers by closing the connection. The reason not means this client does not own the shard, and not means the shard is not currently Connected or lost its connection before the command reached the socket. The reason busy means 500 earlier gateway commands on that shard are still waiting for the pacing budget. Cancelling an unsent command immediately releases its queue capacity, even while the pacing window is full. None of these failures sent anything
class GatewaySendError extends FluxerlyErrorclass GatewaySendError
extends FluxerlyErrorConstructor#
Describe a command that was not sent
Construction has no side effects
new GatewaySendError(
options: {
readonly cause?: unknown
readonly inputValidation?: InputValidationDetail | null
readonly opcode?: number | null
readonly reason:
| "input" | "busy" | "reserved" | "notOwned"
| "notReady"
readonly shardId?: number | null
}
): GatewaySendErrornew GatewaySendError(
options: {
readonly cause?: unknown
readonly inputValidation?:
| InputValidationDetail
| null
readonly opcode?: number | null
readonly reason:
| "input" | "busy"
| "reserved" | "notOwned"
| "notReady"
readonly shardId?:
| number | null
}
): GatewaySendErrorParameters
options-
causeoptional-
Underlying failure retained as the error's cause, such as a JSON encoding error
unknown inputoptionalValidation -
Safe input detail for reason input
Defaults to null
InputValidationDetail | null opcodeoptional-
Requested opcode, or null when the supplied value was not a valid opcode
Defaults to null
number | null reason-
Why the command was not sent
"input" | "busy" | "reserved" | "notOwned" | "notReady"| "input" | "busy" | "reserved" | "notOwned" | "notReady"
Properties#
_tag#
Stable expected-failure discriminator
readonly _tag: "GatewaySendError"inputValidation #
Safe explanation of the invalid argument for reason input, otherwise null
It never contains the rejected value
readonly inputValidation: InputValidationDetail | nullreadonly inputValidation:
| InputValidationDetail | nullopcode#
Requested opcode, or null when the supplied opcode was not a non-negative integer
readonly opcode: number | nullreason#
Why the command was not sent
readonly reason:
| "input" | "busy" | "reserved" | "notOwned" | "notReady"readonly reason:
| "input" | "busy" | "reserved"
| "notOwned" | "notReady"shardId #
readonly shardId: number | nullInherited#
Inherited from Fluxerly: code, details, hint, to