LoadQuorumFailedError
Defined in: packages/core/src/load-quorum.ts:460
Error thrown by PeerborneDocument.load() when the initial-load quorum
gate fails — i.e. fewer than Q peers agreed on a state digest within
the configured timeout. Applications should catch this and either retry
later (peers may converge), surface the failure to the user, or fall
back to an explicit loadQuorumEnabled: false path if they have an
out-of-band trust model.
The 'invalid-config' reason is a special case that surfaces an operator
misconfiguration (e.g. loadQuorumK <= 0) rather than a runtime quorum
failure: retrying without fixing the config will not help. See the
docstring on LoadQuorumFailedReason for the full reason set.
Defined here (alongside the pure decision logic) so callers can instanceof
test without importing the heavy PeerborneDocument module.
Extends
Section titled “Extends”Error
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new LoadQuorumFailedError(
opts):LoadQuorumFailedError
Defined in: packages/core/src/load-quorum.ts:493
Parameters
Section titled “Parameters”agreeingPeerBindFailures?
Section titled “agreeingPeerBindFailures?”ReadonlyMap<string, string>
Per-peer bind-failure record. Only meaningful when
reason === 'bind-check-failed-all-agreeing-peers'; ignored
otherwise.
agreement
Section titled “agreement”ReadonlyMap<string, number>
detail?
Section titled “detail?”string
Free-form detail string used by the 'invalid-config' reason to
carry the offending value into the operator-visible error message
(e.g. loadQuorumK must be a positive integer; got NaN). Non-finite
numbers render as their JS literal ('NaN' / 'Infinity' /
'-Infinity') via formatConfigValue, not the misleading
'null' that JSON.stringify produces. Ignored for the other
reasons, which compose the detail string from the structured
fields.
documentPath
Section titled “documentPath”string
reason
Section titled “reason”requiredQ
Section titled “requiredQ”number
respondingCount
Section titled “respondingCount”number
Returns
Section titled “Returns”LoadQuorumFailedError
Overrides
Section titled “Overrides”Error.constructor
Properties
Section titled “Properties”agreeingPeerBindFailures
Section titled “agreeingPeerBindFailures”
readonlyagreeingPeerBindFailures:ReadonlyMap<string,string>
Defined in: packages/core/src/load-quorum.ts:484
For reason === 'bind-check-failed-all-agreeing-peers': a map from
peer-id (as _peerIdOf extracts it) to the advertised tipsHash hex
that peer served on its full-load response (or the sentinel
'(missing tips)' when the responder omitted the tips array). Lets
callers and operators see WHICH peers in the agreeing cohort
equivocated between the probe round and the load round, and what
they served instead. Empty for all other reasons.
agreement
Section titled “agreement”
readonlyagreement:ReadonlyMap<string,number>
Defined in: packages/core/src/load-quorum.ts:476
Snapshot of (hash hex -> vote count) at the moment of failure, used for observability. Empty when no peer responded.
cause?
Section titled “cause?”
optionalcause?:unknown
Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Section titled “Inherited from”Error.cause
detail?
Section titled “detail?”
readonlyoptionaldetail?:string
Defined in: packages/core/src/load-quorum.ts:491
Structured detail string for the 'invalid-config' reason (e.g.
loadQuorumK must be a positive integer; got NaN). Exposed as a
field so callers (notably runLoadQuorum’s post-init guard) can
forward the validator’s structured wording into a rethrown error
with a different documentPath WITHOUT regex-parsing
error.message. Empty/undefined for all other reasons.
documentPath
Section titled “documentPath”
readonlydocumentPath:string
Defined in: packages/core/src/load-quorum.ts:462
The document path the quorum was being computed for.
message
Section titled “message”message:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”Error.message
name:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Section titled “Inherited from”Error.name
reason
Section titled “reason”
readonlyreason:LoadQuorumFailedReason
Defined in: packages/core/src/load-quorum.ts:466
Why quorum failed — mirrors LoadQuorumDecision.reason on the
failure case so callers can branch on the specific failure mode.
See LoadQuorumFailedReason for the full set.
requiredQ
Section titled “requiredQ”
readonlyrequiredQ:number
Defined in: packages/core/src/load-quorum.ts:473
The effective Q threshold the loader was holding peers to.
respondingCount
Section titled “respondingCount”
readonlyrespondingCount:number
Defined in: packages/core/src/load-quorum.ts:471
Number of peers that returned a signer-attributed vote. Timeouts and
declines do NOT increment this. Used to distinguish
'insufficient-responses' (< Q peers responded at all) from
'no-agreement' (≥ Q responded but no single bucket reached Q).
stack?
Section titled “stack?”
optionalstack?:string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”Error.stack
stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit:number
Defined in: node_modules/@types/node/globals.d.ts:67
The Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Section titled “Inherited from”Error.stackTraceLimit
Methods
Section titled “Methods”captureStackTrace()
Section titled “captureStackTrace()”Call Signature
Section titled “Call Signature”
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/@types/node/globals.d.ts:51
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};Error.captureStackTrace(myObject);myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() { b();}
function b() { c();}
function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error;}
a();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Error.captureStackTrace
Call Signature
Section titled “Call Signature”
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/@types/multicast-dns/node_modules/@types/node/globals.d.ts:136
Create .stack property on a target object
Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Error.captureStackTrace
isError()
Section titled “isError()”
staticisError(error):error is Error
Defined in: node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”error is Error
Inherited from
Section titled “Inherited from”Error.isError
prepareStackTrace()?
Section titled “prepareStackTrace()?”
staticoptionalprepareStackTrace(err,stackTraces):any
Defined in: node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”Error.prepareStackTrace