Class in Errors · JavaScript & TypeScript
Expected collector failure, separate from results that stop at the count, deadline, idle deadline or explicit stop
class CollectorError extends FluxerlyErrorclass CollectorError
extends FluxerlyErrorContains 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 onError as a filter or collector FailureReport with the message IDs, or logged at Error without a hook. Other failures except connectionLost are logged at Warn in the collectors category. Unexpected defects, including cleanup defects, are not made into this expected failure
Constructor#
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
notConnectedmeans registration lacked a connected gateway scope,connectionLostmeans that scope later recovered or disconnectedThe 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 CollectorError
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 notConnected means registration lacked a connected gateway scope, connectionLost 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