openclaw - ✅(Solved) Fix Discord component registry fallback warning should include error details [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#84185Fetched 2026-05-20 03:43:00
View on GitHub
Comments
1
Participants
2
Timeline
9
Reactions
1
Timeline (top)
labeled ×7commented ×1cross-referenced ×1

When Discord persistent component registry state fails to open or operate, the warning log currently records only String(error).

Error Message

When Discord persistent component registry state fails to open or operate, the warning log currently records only String(error). The warning confirms that persistent state failed and that OpenClaw fell back to in-memory registry state, but it omits structured fields such as error name, message, and cause details. That makes persistent-state failures harder to triage from logs. The fallback warning should keep the existing best-effort behavior while logging structured error details when the thrown value is an Error.

Root Cause

Persistent registry failures are recoverable, but diagnosing the underlying storage or runtime issue needs enough context to distinguish configuration, state-store, and filesystem failures.

Fix Action

Fixed

PR fix notes

PR #84190: Log Discord component registry error details

Description (problem / solution / changelog)

Summary

Logs structured details when the Discord persistent component registry falls back after a state-store failure.

Motivation

Closes #84185.

The fallback is intentionally recoverable, but the warning previously only logged String(error), which made storage and runtime failures harder to distinguish.

Change Type

  • Bug fix

Scope

  • Formats thrown registry errors into structured warning metadata.
  • Includes error name, message, stack, and cause details when available.
  • Leaves fallback behavior unchanged.
  • Adds coverage for cause metadata in the warning.

Linked Issue/PR

Closes #84185.

Real Behavior Proof

Behavior or issue addressed: When the Discord persistent component registry cannot open its keyed store, fallback behavior must still work and the real plugin runtime logger must preserve structured error and cause metadata.

Real environment tested: Redacted OpenClaw development checkout on this PR branch, using the Discord component registry runtime with a deliberately failing keyed-store open path.

Exact steps or command run after this patch: Ran a runtime diagnostic using createRuntimeLogging(), injected a store-open failure with an Error cause, registered Discord component entries, resolved a fallback entry, and captured the redacted JSON log record emitted through the real runtime logging adapter.

Evidence after fix: Redacted runtime output:

{
  "fallbackEntryAvailable": true,
  "warningMessage": "Discord persistent component registry state failed",
  "structuredMetadata": {
    "errorName": "Error",
    "errorMessage": "redacted registry state open failed",
    "errorCauseName": "TypeError",
    "errorCauseMessage": "redacted state backend unavailable"
  }
}

Earlier call-site diagnostic before the runtime adapter fix:

{
  "fallbackEntryAvailable": true,
  "warning": {
    "message": "Discord persistent component registry state failed",
    "errorName": "Error",
    "errorMessage": "redacted registry state open failed",
    "errorCauseName": "TypeError",
    "errorCauseMessage": "redacted state backend unavailable"
  }
}

Observed result after fix: Fallback registry resolution remained available, and the warning emitted through the real runtime logging adapter retained errorName, errorMessage, errorCauseName, and errorCauseMessage metadata.

Not tested: No live Discord provider send was needed for this persistent-registry fallback logging path.

Root Cause

The registry warning collapsed the thrown value to a single string, discarding structured Error fields and cause context.

Regression Test Plan

  • node scripts/run-vitest.mjs extensions/discord/src/components.test.ts src/plugins/runtime/runtime-logging.test.ts

Result: 2 files passed, 10 tests passed.

User-visible / Behavior Changes

No user-facing behavior change. Operators get more actionable warning metadata when persistent component state fails and OpenClaw falls back to in-memory state.

Diagram

N/A. This is warning metadata only.

Security Impact

No new secrets, permissions, or external calls. The logged metadata is limited to the caught error details already available in-process.

Repro + Verification

Before this change, the fallback warning only included String(error), and the production runtime logging adapter dropped metadata arguments. The new regression tests verify name, message, and cause details at the Discord call site and metadata forwarding in the runtime logger adapter; the redacted runtime diagnostic confirms fallback remains available and the real log record carries the structured metadata.

Evidence

  • Focused regression command passed.
  • Redacted runtime diagnostic above confirms the fallback entry remains available and the real runtime log record includes structured error and cause metadata.

Human Verification

No live Discord service is required for this deterministic fallback logging path.

Compatibility / Migration

Backward compatible. The warning message text is unchanged, and metadata gains additional fields.

Risks

Low. The formatter is best-effort and is wrapped by the existing logging guard.

Changed files

  • extensions/discord/src/components-registry.ts (modified, +49/-1)
  • extensions/discord/src/components.test.ts (modified, +15/-2)
  • src/plugins/runtime/runtime-logging.test.ts (added, +55/-0)
  • src/plugins/runtime/runtime-logging.ts (modified, +20/-4)
RAW_BUFFERClick to expand / collapse

Summary

When Discord persistent component registry state fails to open or operate, the warning log currently records only String(error).

Current behavior

The warning confirms that persistent state failed and that OpenClaw fell back to in-memory registry state, but it omits structured fields such as error name, message, and cause details. That makes persistent-state failures harder to triage from logs.

Expected behavior

The fallback warning should keep the existing best-effort behavior while logging structured error details when the thrown value is an Error.

Why this matters

Persistent registry failures are recoverable, but diagnosing the underlying storage or runtime issue needs enough context to distinguish configuration, state-store, and filesystem failures.

Suggested scope

Keep this narrow:

  • Format registry errors into structured warning metadata.
  • Include cause details when available.
  • Keep fallback behavior unchanged.
  • Add coverage for the warning metadata.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The fallback warning should keep the existing best-effort behavior while logging structured error details when the thrown value is an Error.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix Discord component registry fallback warning should include error details [1 pull requests, 1 comments, 2 participants]