Bug Description
getDispatcherFinalOutcomeCounts() in dist/dispatch-DphqeP-y.js throws TypeError: dispatcher.getFailedCounts is not a function because it lacks optional chaining (?.).
Root Cause
Line 455 in dispatch-DphqeP-y.js:
function getDispatcherFinalOutcomeCounts(dispatcher) {
return {
cancelled: dispatcher.getCancelledCounts?.().final ?? 0, // ✓ uses ?.
failed: dispatcher.getFailedCounts().final // ✗ missing ?.
};
}
Line 454 correctly uses optional chaining for getCancelledCounts, but line 455 does not for getFailedCounts. This is inconsistent.
Expected Behavior
The function should use optional chaining consistently:
failed: dispatcher.getFailedCounts?.().final ?? 0
Environment
- OpenClaw version: 2026.5.28 (e932160)
- OS: Ubuntu 24.04 LTS
Impact
This error crashes dispatch operations when the dispatcher object doesn't have the getFailedCounts method (e.g., certain plugin-provided dispatchers or custom configurations).
Suggested Fix
Add optional chaining to line 455 to match line 454's pattern.
Bug Description
getDispatcherFinalOutcomeCounts()indist/dispatch-DphqeP-y.jsthrowsTypeError: dispatcher.getFailedCounts is not a functionbecause it lacks optional chaining (?.).Root Cause
Line 455 in
dispatch-DphqeP-y.js:Line 454 correctly uses optional chaining for
getCancelledCounts, but line 455 does not forgetFailedCounts. This is inconsistent.Expected Behavior
The function should use optional chaining consistently:
Environment
Impact
This error crashes dispatch operations when the dispatcher object doesn't have the
getFailedCountsmethod (e.g., certain plugin-provided dispatchers or custom configurations).Suggested Fix
Add optional chaining to line 455 to match line 454's pattern.