On This Page

PaginationError

Class in Errors · JavaScript & TypeScript

Reading multiple pages failed because of invalid settings, a page limit, a stalled cursor or search readiness

Contains no resource IDs, response bodies or accumulated partial result. Items returned before the failure remain available to the application. A remote request failure keeps the underlying page-operation error instead of becoming PaginationError. Default-API cancellation uses CancelledError, while native interruption stays in Effect Cause. Unexpected defects remain separate

class PaginationError extends FluxerlyErrorclass PaginationError
  extends FluxerlyError

Constructor#

Identify the failed traversal and its local failure reason

Validation detail is copied and frozen when supplied, otherwise null. Construction does not start or resume traversal

new PaginationError(
    options: {
        readonly cause?: unknown
        readonly inputValidation?: InputValidationDetail | null
        readonly operation: PaginationOperation
        readonly reason:
            | "input" | "cursorStalled" | "pageLimit" | "indexing"
    }
): PaginationErrornew PaginationError(
  options: {
    readonly cause?: unknown
    readonly inputValidation?:
      | InputValidationDetail
      | null
    readonly operation:
      PaginationOperation
    readonly reason:
      | "input" | "cursorStalled"
      | "pageLimit" | "indexing"
  }
): PaginationError

Parameters

options
cause optional

Underlying failure retained as the error's cause

unknown
inputValidation optional

Safe local validation detail copied into inputValidation

Defaults to null

InputValidationDetail | null
operation

Traversal that failed

PaginationOperation
reason

Failure category, as described on the reason field

"input" | "cursorStalled" | "pageLimit" | "indexing"| "input" | "cursorStalled"
| "pageLimit" | "indexing"

Properties#

_tag#

Literal error tag for identifying PaginationError

readonly _tag: "PaginationError"

inputValidation#

Frozen local validation detail for reason input, otherwise null

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

operation#

Traversal that failed

Its presence does not establish that any page request was sent

readonly operation: PaginationOperation

reason#

Failure category

The reason input means invalid settings, cursorStalled means no cursor progress, and pageLimit means another page would exceed maxPages. The reason indexing means message search is preparing an index and traversal will not poll it

readonly reason:
    | "input" | "cursorStalled" | "pageLimit" | "indexing"readonly reason:
  | "input" | "cursorStalled"
  | "pageLimit" | "indexing"

Inherited#

Inherited from FluxerlyError: code, details, hint, toJSON