On This Page

GuildOperationError

Class in Errors · JavaScript & TypeScript

Expected failure from guild, member, role and related resource operations

Before retrying, check operation for the failed step, reason for the failure type and outcome for whether the request may have reached Fluxer. Safe metadata excludes tokens, private input values and upstream response bodies. Default API methods return this error in an Err, while Effect methods fail in the typed error channel. Local misuse is thrown instead: The hierarchy helpers, permissions.calculate and cache lookups throw it with reason input for malformed input. Cancellation and client closure use separate error types. An HTTP response does not establish that a corresponding gateway event was delivered. A missing-permission rejection lists the permissions that the operation needs in details.requiredPermissions when the SDK knows them, as ApiErrorDetail describes

class GuildOperationError extends FluxerlyErrorclass GuildOperationError
  extends FluxerlyError

Constructor#

Create the failure from its operation, reason and outcome, with optional status, retry wait, API detail, input detail and cause

new GuildOperationError(
    options: OperationErrorOptions<GuildOperation>
): GuildOperationErrornew GuildOperationError(
  options: OperationErrorOptions<
    GuildOperation
  >
): GuildOperationError

Parameters

Properties#

_tag#

Stable expected-failure discriminator

readonly _tag: "GuildOperationError"

apiError#

Safe classification of why Fluxer rejected the request, or null when the response could not be classified

readonly apiError: ApiErrorDetail | nullreadonly apiError:
  | ApiErrorDetail | null

inputValidation#

Safe explanation of the locally invalid property, or null when no input problem could be identified

readonly inputValidation: InputValidationDetail | nullreadonly inputValidation:
  | InputValidationDetail | null

operation#

Requested operation

readonly operation: GuildOperation

outcome#

Whether the request may have reached Fluxer, described by OperationOutcome

readonly outcome: OperationOutcome

reason#

Failure category, described by OperationReason

readonly reason: OperationReason

retryAfterMs#

Usable server-required retry wait in milliseconds, otherwise null

readonly retryAfterMs: number | nullreadonly retryAfterMs:
  | number | null

status#

HTTP status when available, otherwise null

readonly status: number | null

Inherited#

Inherited from FluxerlyError: code, details, hint, toJSON