On This Page

ChannelOperationError

Class in Errors · JavaScript & TypeScript

Expected failure when reading or changing community channels, threads and forum tags

Check reason to identify the failure. Check outcome before retrying a change because an uncertain write may have happened. The error contains no token, private input value or server response body. The default API returns it in an Err. The Effect API fails with it in its typed error channel. A missing-permission rejection lists the permissions that the operation needs in details.requiredPermissions when the SDK knows them, as ApiErrorDetail describes

class ChannelOperationError extends FluxerlyErrorclass ChannelOperationError
  extends FluxerlyError

Constructor#

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

new ChannelOperationError(
    options: OperationErrorOptions<ChannelOperation>
): ChannelOperationErrornew ChannelOperationError(
  options: OperationErrorOptions<
    ChannelOperation
  >
): ChannelOperationError

Parameters

Properties#

_tag#

Stable expected-failure discriminator

readonly _tag: "ChannelOperationError"

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: ChannelOperation

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