On This Page

MessageOperationError

Class in Errors · JavaScript & TypeScript

A message lookup, read or change failed

Read operation to identify the call and reason to distinguish invalid input, full local capacity and Fluxer failures. A local get cache miss is successful undefined, not this error. Reads do not change messages, but a mutation with outcome unknown may already have taken effect. Error details contain no response body, credential or message content. A missing-permission rejection lists the permissions that the operation needs in details.requiredPermissions when the SDK knows them, as ApiErrorDetail describes. Cancellation in the default API and client closure have separate error tags and can also occur after mutation dispatch

class MessageOperationError extends FluxerlyErrorclass MessageOperationError
  extends FluxerlyError

Constructor#

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

new MessageOperationError(
    options: OperationErrorOptions<
        | "search" | "fetch" | "delete" | "edit" | "typing"
        | "publish" | "fetchCrosspostSource" | "messages.get"
        | "fetchHistory" | "fetchReactionUsers" | "fetchHasReaction"
        | "pin" | "unpin" | "fetchPins" | "addReaction"
        | "removeReaction" | "removeUserReaction" | "clearReaction"
        | "clearReactions" | "deleteAttachment" | "deleteMany"
        | "deleteOwnMessages"
    >
): MessageOperationErrornew MessageOperationError(
  options: OperationErrorOptions<
    | "search" | "fetch" | "delete"
    | "edit" | "typing" | "publish"
    | "fetchCrosspostSource"
    | "messages.get"
    | "fetchHistory"
    | "fetchReactionUsers"
    | "fetchHasReaction" | "pin"
    | "unpin" | "fetchPins"
    | "addReaction"
    | "removeReaction"
    | "removeUserReaction"
    | "clearReaction"
    | "clearReactions"
    | "deleteAttachment"
    | "deleteMany"
    | "deleteOwnMessages"
  >
): MessageOperationError

Parameters

options
OperationErrorOptions<
    | "search" | "fetch" | "delete" | "edit" | "typing" | "publish"
    | "fetchCrosspostSource" | "messages.get" | "fetchHistory"
    | "fetchReactionUsers" | "fetchHasReaction" | "pin" | "unpin"
    | "fetchPins" | "addReaction" | "removeReaction"
    | "removeUserReaction" | "clearReaction" | "clearReactions"
    | "deleteAttachment" | "deleteMany" | "deleteOwnMessages"
>OperationErrorOptions<
  | "search" | "fetch" | "delete"
  | "edit" | "typing" | "publish"
  | "fetchCrosspostSource"
  | "messages.get" | "fetchHistory"
  | "fetchReactionUsers"
  | "fetchHasReaction" | "pin"
  | "unpin" | "fetchPins"
  | "addReaction" | "removeReaction"
  | "removeUserReaction"
  | "clearReaction" | "clearReactions"
  | "deleteAttachment" | "deleteMany"
  | "deleteOwnMessages"
>

Properties#

_tag#

Stable discriminator for expected message-management failures

readonly _tag: "MessageOperationError"

apiError#

Reviewed Fluxer rejection detail, or null when no safe classification is available

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#

The requested operation, independent of the gateway connection state

readonly operation:
    | "search" | "fetch" | "delete" | "edit" | "typing" | "publish"
    | "fetchCrosspostSource" | "messages.get" | "fetchHistory"
    | "fetchReactionUsers" | "fetchHasReaction" | "pin" | "unpin"
    | "fetchPins" | "addReaction" | "removeReaction"
    | "removeUserReaction" | "clearReaction" | "clearReactions"
    | "deleteAttachment" | "deleteMany" | "deleteOwnMessages"readonly operation:
  | "search" | "fetch" | "delete"
  | "edit" | "typing" | "publish"
  | "fetchCrosspostSource"
  | "messages.get" | "fetchHistory"
  | "fetchReactionUsers"
  | "fetchHasReaction" | "pin"
  | "unpin" | "fetchPins"
  | "addReaction"
  | "removeReaction"
  | "removeUserReaction"
  | "clearReaction"
  | "clearReactions"
  | "deleteAttachment"
  | "deleteMany"
  | "deleteOwnMessages"

outcome#

Whether the request may have reached Fluxer, described by OperationOutcome

Preparatory file uploads may already have occurred even when no message or reaction request was dispatched. An unknown outcome includes server errors and missing or invalid success responses. Read calls do not mutate messages even when their request outcome is unknown

readonly outcome: OperationOutcome

reason#

Failure category, described by OperationReason

Busy also covers full local upload capacity, and notFound applies to the target or its containing resource

readonly reason: OperationReason

retryAfterMs#

Server-required wait in milliseconds when usable, otherwise null

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

status#

HTTP status when available to this failure, otherwise null

readonly status: number | null

Inherited#

Inherited from FluxerlyError: code, details, hint, toJSON