Whether an error is the fence refusing (or failing to answer). The two are
one class for every CALLER that must degrade closed — an alarm swallowing
both, a tick skipping its pass — because a state it could not read and a
state that forbids the work lead to the same action.
The CODE counts as well as the class, because a refusal that crossed a
Durable Object boundary is no longer an instance of anything: the run object
threw ExecutionFencedError, doErrorResponse rendered it, and doSummary
rebuilt it on the Worker side as a RunRouteError carrying the same status
and the same structured reason. That rebuilt error IS the fence refusing —
the callers most in need of recognizing one (a run router deciding whether to
give a reservation's claim back, a tick deciding whether to skip a pass) are
exactly the ones sitting on the far side of that boundary, and an
instanceof-only test would answer "no" for every one of them.
The two codes are matched by name rather than by any structural sniff: only
refusals this package authors publish them, and both are declared as literals
on the classes above, so a code arriving over the wire came from one of them.
Whether an error is the fence refusing (or failing to answer). The two are one class for every CALLER that must degrade closed — an alarm swallowing both, a tick skipping its pass — because a state it could not read and a state that forbids the work lead to the same action.
The CODE counts as well as the class, because a refusal that crossed a Durable Object boundary is no longer an instance of anything: the run object threw ExecutionFencedError,
doErrorResponserendered it, anddoSummaryrebuilt it on the Worker side as aRunRouteErrorcarrying the same status and the same structured reason. That rebuilt error IS the fence refusing — the callers most in need of recognizing one (a run router deciding whether to give a reservation's claim back, a tick deciding whether to skip a pass) are exactly the ones sitting on the far side of that boundary, and an instanceof-only test would answer "no" for every one of them.The two codes are matched by name rather than by any structural sniff: only refusals this package authors publish them, and both are declared as literals on the classes above, so a code arriving over the wire came from one of them.