Class in Errors · JavaScript & TypeScript
class GuildOperationError extends FluxerlyErrorclass GuildOperationError
extends FluxerlyErrorBefore 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 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 when the SDK knows them, as ApiErrorDetail describes
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
>
): GuildOperationErrorParameters
options-
OperationErrorOptions<GuildOperation>
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 | nullinputValidation #
Safe explanation of the locally invalid property, or null when no input problem could be identified
readonly inputValidation: InputValidationDetail | nullreadonly inputValidation:
| InputValidationDetail | nulloperation#
Requested operation
readonly operation: GuildOperationoutcome#
Whether the request may have reached Fluxer, described by OperationOutcome
readonly outcome: OperationOutcomereason#
Failure category, described by OperationReason
readonly reason: OperationReasonretryAfterMs #
Usable server-required retry wait in milliseconds, otherwise null
readonly retryAfterMs: number | nullreadonly retryAfterMs:
| number | nullstatus#
HTTP status when available, otherwise null
readonly status: number | nullInherited#
Inherited from Fluxerly: code, details, hint, to