Class in Errors · JavaScript & TypeScript
Expected collector failure, separate from results that stop at the count, deadline, idle deadline or explicit stop
Contains no message bodies or partial observations. A filter or callback failure keeps the application's thrown value as cause. A filter or callback failure is also reported to the client-level on as a filter or collector Failure with the message IDs, or logged at Error without a hook. Other failures except connection are logged at Warn in the collectors category. Unexpected defects, including cleanup defects, are not made into this expected failure
class CollectorError extends FluxerlyErrorclass CollectorError
extends FluxerlyErrorConstructor#
Describe a collector failure, optionally identifying the budget and capacity that were exceeded
Collector errors are normally received from a collector. Construction does not stop a collector
new CollectorError(
reason:
| "filter" | "overflow" | "handler" | "notConnected"
| "connectionLost",
limit?:
| "maxBytes" | "maxPendingMessages" | "maxPendingBytes"
| null,
capacity?: number | null,
options?: { readonly cause?: unknown }
): CollectorErrornew CollectorError(
reason:
| "filter" | "overflow"
| "handler" | "notConnected"
| "connectionLost",
limit?:
| "maxBytes"
| "maxPendingMessages"
| "maxPendingBytes" | null,
capacity?: number | null,
options?: {
readonly cause?: unknown
}
): CollectorErrorParameters
reason-
The reason
notmeans registration lacked a connected gateway scope,Connected connectionmeans that scope later recovered or disconnectedLost The reason filter or handler means application selection or callback failed, overflow means a retained or pending budget was exceeded
| "filter" | "overflow" | "handler" | "notConnected" | "connectionLost"| "filter" | "overflow" | "handler" | "notConnected" | "connectionLost" limitoptional-
Name of the exceeded budget, or null when the failure was not overflow
"maxBytes" | "maxPendingMessages" | "maxPendingBytes" | null| "maxBytes" | "maxPendingMessages" | "maxPendingBytes" | null capacityoptional-
Configured budget capacity, measured in queued payloads or UTF-8 JSON bytes, or null for other failures
number | null optionsoptional-
Optional underlying failure retained as the error's cause
{ readonly cause?: unknown }
Properties#
_tag#
Literal error tag for identifying Collector
readonly _tag: "CollectorError"capacity#
Configured budget capacity, measured in queued payloads or UTF-8 JSON bytes, or null for other failures
readonly capacity: number | nulllimit#
Name of the exceeded budget, or null when the failure was not overflow
readonly limit:
| "maxBytes" | "maxPendingMessages" | "maxPendingBytes" | nullreadonly limit:
| "maxBytes"
| "maxPendingMessages"
| "maxPendingBytes" | nullreason#
The reason not means registration lacked a connected gateway scope, connection means that scope later recovered or disconnected
The reason filter or handler means application selection or callback failed, overflow means a retained or pending budget was exceeded
readonly reason:
| "filter" | "overflow" | "handler" | "notConnected"
| "connectionLost"readonly reason:
| "filter" | "overflow"
| "handler" | "notConnected"
| "connectionLost"Inherited#
Inherited from Fluxerly: code, details, hint, to