On This Page

ConfigurationError

Class in Errors · JavaScript & TypeScript

A client setting or operation option is invalid before the requested work starts

class ConfigurationError extends FluxerlyErrorclass ConfigurationError
  extends FluxerlyError

Use field to identify the setting without exposing its rejected value

Constructor#

new ConfigurationError(
    field:
        | "filter" | "emoji" | "name" | "signal" | "command" | "key"
        | "message" | "format" | "instance" | "transport"
        | "overflow" | "prefix" | "next" | "event" | "fetch"
        | "channelId" | "guildId" | "emojis" | "stickers" | "flags"
        | "limit" | "commands" | "schedule" | "roles" | "timeoutMs"
        | "concurrency" | "partition" | "debug" | "gateway" | "rest"
        | "cache" | "supervisor" | "level" | "categories" | "sink"
        | "dedupe" | "unsafe" | "identify" | "guilds" | "users"
        | "messages" | "maxMessages" | "idleMs" | "maxBytes"
        | "maxReactions" | "handler" | "maxPendingMessages"
        | "maxPendingBytes" | "recovery" | "configuration"
        | "logging" | "onMalformedDispatch" | "childOutput"
        | "token" | "connection" | "sharding" | "totalShards"
        | "shardIds" | "startupTimeoutMs" | "maxStartupAttempts"
        | "eventOptions" | "partitionReady" | "maxPendingChanges"
        | "cacheObserverOptions" | "onError" | "observe" | "uploads"
        | "members" | "channels" | "directMessages" | "maxEntries"
        | "maxAgeMs" | "kind" | "collectorOptions" | "onReaction"
        | "onMessage" | "pages" | "paginateOptions" | "removeClicks"
        | "messageFields" | "help" | "parser" | "aliases"
        | "cooldown" | "assignments" | "childId" | "entry"
        | "restart" | "maxAttempts" | "minDelayMs" | "maxDelayMs"
        | "minimumSpacingMs" | "processes" | "shardsPerProcess"
        | "diagnosticsIntervalMs" | "shutdownTimeoutMs" | "drainMs"
        | "childEnvironment" | "args" | "execArgv" | "ignoredEvents"
        | "presence" | "sessions" | "attemptTimeoutMs"
        | "healthyResetMs" | "mediaConcurrency" | "maxQueued"
        | "queuedJsonMaxBytes" | "defaultTimeoutMs" | "webSocket"
        | "userAgent" | "middleware" | "listener" | "task"
        | "delayMs" | "intervalMs" | "embedField",
    message: string,
    options?: { readonly cause?: unknown; readonly hint?: string }
): ConfigurationErrornew ConfigurationError(
  field:
    | "filter" | "emoji" | "name"
    | "signal" | "command" | "key"
    | "message" | "format"
    | "instance" | "transport"
    | "overflow" | "prefix"
    | "next" | "event" | "fetch"
    | "channelId" | "guildId"
    | "emojis" | "stickers"
    | "flags" | "limit"
    | "commands" | "schedule"
    | "roles" | "timeoutMs"
    | "concurrency" | "partition"
    | "debug" | "gateway" | "rest"
    | "cache" | "supervisor"
    | "level" | "categories"
    | "sink" | "dedupe" | "unsafe"
    | "identify" | "guilds"
    | "users" | "messages"
    | "maxMessages" | "idleMs"
    | "maxBytes" | "maxReactions"
    | "handler"
    | "maxPendingMessages"
    | "maxPendingBytes"
    | "recovery" | "configuration"
    | "logging"
    | "onMalformedDispatch"
    | "childOutput" | "token"
    | "connection" | "sharding"
    | "totalShards" | "shardIds"
    | "startupTimeoutMs"
    | "maxStartupAttempts"
    | "eventOptions"
    | "partitionReady"
    | "maxPendingChanges"
    | "cacheObserverOptions"
    | "onError" | "observe"
    | "uploads" | "members"
    | "channels" | "directMessages"
    | "maxEntries" | "maxAgeMs"
    | "kind" | "collectorOptions"
    | "onReaction" | "onMessage"
    | "pages" | "paginateOptions"
    | "removeClicks"
    | "messageFields" | "help"
    | "parser" | "aliases"
    | "cooldown" | "assignments"
    | "childId" | "entry"
    | "restart" | "maxAttempts"
    | "minDelayMs" | "maxDelayMs"
    | "minimumSpacingMs"
    | "processes"
    | "shardsPerProcess"
    | "diagnosticsIntervalMs"
    | "shutdownTimeoutMs"
    | "drainMs"
    | "childEnvironment" | "args"
    | "execArgv" | "ignoredEvents"
    | "presence" | "sessions"
    | "attemptTimeoutMs"
    | "healthyResetMs"
    | "mediaConcurrency"
    | "maxQueued"
    | "queuedJsonMaxBytes"
    | "defaultTimeoutMs"
    | "webSocket" | "userAgent"
    | "middleware" | "listener"
    | "task" | "delayMs"
    | "intervalMs" | "embedField",
  message: string,
  options?: {
    readonly cause?: unknown
    readonly hint?: string
  }
): ConfigurationError

Parameters

field

The invalid option or containing object, including unsupported cache keys, without its rejected value

| "filter" | "emoji" | "name" | "signal" | "command" | "key"
| "message" | "format" | "instance" | "transport" | "overflow"
| "prefix" | "next" | "event" | "fetch" | "channelId" | "guildId"
| "emojis" | "stickers" | "flags" | "limit" | "commands"
| "schedule" | "roles" | "timeoutMs" | "concurrency" | "partition"
| "debug" | "gateway" | "rest" | "cache" | "supervisor" | "level"
| "categories" | "sink" | "dedupe" | "unsafe" | "identify"
| "guilds" | "users" | "messages" | "maxMessages" | "idleMs"
| "maxBytes" | "maxReactions" | "handler" | "maxPendingMessages"
| "maxPendingBytes" | "recovery" | "configuration" | "logging"
| "onMalformedDispatch" | "childOutput" | "token" | "connection"
| "sharding" | "totalShards" | "shardIds" | "startupTimeoutMs"
| "maxStartupAttempts" | "eventOptions" | "partitionReady"
| "maxPendingChanges" | "cacheObserverOptions" | "onError"
| "observe" | "uploads" | "members" | "channels" | "directMessages"
| "maxEntries" | "maxAgeMs" | "kind" | "collectorOptions"
| "onReaction" | "onMessage" | "pages" | "paginateOptions"
| "removeClicks" | "messageFields" | "help" | "parser" | "aliases"
| "cooldown" | "assignments" | "childId" | "entry" | "restart"
| "maxAttempts" | "minDelayMs" | "maxDelayMs" | "minimumSpacingMs"
| "processes" | "shardsPerProcess" | "diagnosticsIntervalMs"
| "shutdownTimeoutMs" | "drainMs" | "childEnvironment" | "args"
| "execArgv" | "ignoredEvents" | "presence" | "sessions"
| "attemptTimeoutMs" | "healthyResetMs" | "mediaConcurrency"
| "maxQueued" | "queuedJsonMaxBytes" | "defaultTimeoutMs"
| "webSocket" | "userAgent" | "middleware" | "listener" | "task"
| "delayMs" | "intervalMs" | "embedField"| "filter" | "emoji" | "name"
| "signal" | "command" | "key"
| "message" | "format" | "instance"
| "transport" | "overflow" | "prefix"
| "next" | "event" | "fetch"
| "channelId" | "guildId" | "emojis"
| "stickers" | "flags" | "limit"
| "commands" | "schedule" | "roles"
| "timeoutMs" | "concurrency"
| "partition" | "debug" | "gateway"
| "rest" | "cache" | "supervisor"
| "level" | "categories" | "sink"
| "dedupe" | "unsafe" | "identify"
| "guilds" | "users" | "messages"
| "maxMessages" | "idleMs"
| "maxBytes" | "maxReactions"
| "handler" | "maxPendingMessages"
| "maxPendingBytes" | "recovery"
| "configuration" | "logging"
| "onMalformedDispatch"
| "childOutput" | "token"
| "connection" | "sharding"
| "totalShards" | "shardIds"
| "startupTimeoutMs"
| "maxStartupAttempts"
| "eventOptions" | "partitionReady"
| "maxPendingChanges"
| "cacheObserverOptions" | "onError"
| "observe" | "uploads" | "members"
| "channels" | "directMessages"
| "maxEntries" | "maxAgeMs" | "kind"
| "collectorOptions" | "onReaction"
| "onMessage" | "pages"
| "paginateOptions" | "removeClicks"
| "messageFields" | "help" | "parser"
| "aliases" | "cooldown"
| "assignments" | "childId" | "entry"
| "restart" | "maxAttempts"
| "minDelayMs" | "maxDelayMs"
| "minimumSpacingMs" | "processes"
| "shardsPerProcess"
| "diagnosticsIntervalMs"
| "shutdownTimeoutMs" | "drainMs"
| "childEnvironment" | "args"
| "execArgv" | "ignoredEvents"
| "presence" | "sessions"
| "attemptTimeoutMs"
| "healthyResetMs"
| "mediaConcurrency" | "maxQueued"
| "queuedJsonMaxBytes"
| "defaultTimeoutMs" | "webSocket"
| "userAgent" | "middleware"
| "listener" | "task" | "delayMs"
| "intervalMs" | "embedField"
message

Explanation of the accepted setting, without its rejected value

string
options optional

Optional suggested fix and underlying cause

{ readonly cause?: unknown; readonly hint?: string }{
  readonly cause?: unknown
  readonly hint?: string
}

Properties#

_tag#

Discriminator for narrowing a local configuration failure

readonly _tag: "ConfigurationError"

field#

The invalid option or containing object, including unsupported cache keys, without its rejected value

readonly field:
    | "filter" | "emoji" | "name" | "signal" | "command" | "key"
    | "message" | "format" | "instance" | "transport" | "overflow"
    | "prefix" | "next" | "event" | "fetch" | "channelId"
    | "guildId" | "emojis" | "stickers" | "flags" | "limit"
    | "commands" | "schedule" | "roles" | "timeoutMs"
    | "concurrency" | "partition" | "debug" | "gateway" | "rest"
    | "cache" | "supervisor" | "level" | "categories" | "sink"
    | "dedupe" | "unsafe" | "identify" | "guilds" | "users"
    | "messages" | "maxMessages" | "idleMs" | "maxBytes"
    | "maxReactions" | "handler" | "maxPendingMessages"
    | "maxPendingBytes" | "recovery" | "configuration" | "logging"
    | "onMalformedDispatch" | "childOutput" | "token" | "connection"
    | "sharding" | "totalShards" | "shardIds" | "startupTimeoutMs"
    | "maxStartupAttempts" | "eventOptions" | "partitionReady"
    | "maxPendingChanges" | "cacheObserverOptions" | "onError"
    | "observe" | "uploads" | "members" | "channels"
    | "directMessages" | "maxEntries" | "maxAgeMs" | "kind"
    | "collectorOptions" | "onReaction" | "onMessage" | "pages"
    | "paginateOptions" | "removeClicks" | "messageFields" | "help"
    | "parser" | "aliases" | "cooldown" | "assignments" | "childId"
    | "entry" | "restart" | "maxAttempts" | "minDelayMs"
    | "maxDelayMs" | "minimumSpacingMs" | "processes"
    | "shardsPerProcess" | "diagnosticsIntervalMs"
    | "shutdownTimeoutMs" | "drainMs" | "childEnvironment" | "args"
    | "execArgv" | "ignoredEvents" | "presence" | "sessions"
    | "attemptTimeoutMs" | "healthyResetMs" | "mediaConcurrency"
    | "maxQueued" | "queuedJsonMaxBytes" | "defaultTimeoutMs"
    | "webSocket" | "userAgent" | "middleware" | "listener" | "task"
    | "delayMs" | "intervalMs" | "embedField"readonly field:
  | "filter" | "emoji" | "name"
  | "signal" | "command" | "key"
  | "message" | "format"
  | "instance" | "transport"
  | "overflow" | "prefix" | "next"
  | "event" | "fetch" | "channelId"
  | "guildId" | "emojis"
  | "stickers" | "flags" | "limit"
  | "commands" | "schedule"
  | "roles" | "timeoutMs"
  | "concurrency" | "partition"
  | "debug" | "gateway" | "rest"
  | "cache" | "supervisor"
  | "level" | "categories" | "sink"
  | "dedupe" | "unsafe"
  | "identify" | "guilds" | "users"
  | "messages" | "maxMessages"
  | "idleMs" | "maxBytes"
  | "maxReactions" | "handler"
  | "maxPendingMessages"
  | "maxPendingBytes" | "recovery"
  | "configuration" | "logging"
  | "onMalformedDispatch"
  | "childOutput" | "token"
  | "connection" | "sharding"
  | "totalShards" | "shardIds"
  | "startupTimeoutMs"
  | "maxStartupAttempts"
  | "eventOptions"
  | "partitionReady"
  | "maxPendingChanges"
  | "cacheObserverOptions"
  | "onError" | "observe"
  | "uploads" | "members"
  | "channels" | "directMessages"
  | "maxEntries" | "maxAgeMs"
  | "kind" | "collectorOptions"
  | "onReaction" | "onMessage"
  | "pages" | "paginateOptions"
  | "removeClicks"
  | "messageFields" | "help"
  | "parser" | "aliases"
  | "cooldown" | "assignments"
  | "childId" | "entry" | "restart"
  | "maxAttempts" | "minDelayMs"
  | "maxDelayMs"
  | "minimumSpacingMs"
  | "processes"
  | "shardsPerProcess"
  | "diagnosticsIntervalMs"
  | "shutdownTimeoutMs" | "drainMs"
  | "childEnvironment" | "args"
  | "execArgv" | "ignoredEvents"
  | "presence" | "sessions"
  | "attemptTimeoutMs"
  | "healthyResetMs"
  | "mediaConcurrency"
  | "maxQueued"
  | "queuedJsonMaxBytes"
  | "defaultTimeoutMs"
  | "webSocket" | "userAgent"
  | "middleware" | "listener"
  | "task" | "delayMs"
  | "intervalMs" | "embedField"

Inherited#

Inherited from FluxerlyError: code, details, hint, toJSON