Repository navigation
Conversation
…equestId When openclaw nodes approve fails with "unknown requestId", the error message gave users no actionable guidance. This adds a hint that lists current pending requestIds and points to the openclaw nodes pending command for inspection. - Add isUnknownNodePairRequestIdError helper to detect the specific GatewayClientRequestError / INVALID_REQUEST unknown requestId error - Add buildUnknownRequestIdHint to fetch pending requests and build a descriptive error message - Wrap the approve call in try/catch to intercept unknown requestId errors and surface the hint with pending IDs Closes openclaw#94040
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. This PR is a useful attempt at the nodes approval error, but it is not the best landing path: the same central fix is already covered by the open, proof-positive #94452, while this branch still has a user-visible formatting defect and no real behavior proof. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Close this parallel branch, review or land #94452 as the focused fix, and carry over any desired extra fallback tests there if maintainers want broader coverage. So I’m closing this here and keeping the remaining discussion on #94452. Review detailsBest possible solution: Close this parallel branch, review or land #94452 as the focused fix, and carry over any desired extra fallback tests there if maintainers want broader coverage. Do we have a high-confidence way to reproduce the issue? Yes, source inspection shows current main returns Is this the best way to solve the issue? No for this branch: the focused approach is right, but #94452 already implements the same CLI-layer fix with better message formatting and real behavior proof. Security review: Security review cleared: The diff only changes nodes CLI error rendering and mocked CLI tests, with no dependency, workflow, secret, permission, auth-policy, or storage changes. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 6ef4684b89a0. |
|
ClawSweeper applied the proposed close for this PR.
|
Summary
When
openclaw nodes approve <requestId>fails with "unknown requestId", the CLI now lists the current valid pending requestIds so users can identify the correct request without guessing.Problem
Running
openclaw nodes approve <requestId>with a stale or typo'd requestId produces an opaqueGatewayClientRequestError: unknown requestIderror. Users have no way to discover which requestIds are valid without runningopenclaw nodes pendingseparately.Root Cause
The gateway returns
INVALID_REQUEST / "unknown requestId"when the requestId is not found in the pending list, but the CLI passes this error through without surfacing the currently valid pending requestIds. Seesrc/cli/nodes-cli/register.pairing.ts:107-121.Changes
src/cli/nodes-cli/register.pairing.ts— addisUnknownNodePairRequestIdErrordetector andbuildUnknownRequestIdHintthat fetches pending requests; wrap approve call in try/catch to surface the hint when the specific error is detectedsrc/cli/nodes-cli/register.pairing.unknown-request-id.test.ts— add tests for the hint with pending IDs, fallback when list fails, and non-intercept of unrelated errorsTesting
3 new tests cover: pending IDs displayed, fallback when listing fails, non-unknown-requestId errors pass through unchanged. Full CI needed (no local pnpm).
Related
Closes #94040
参考 #94452 — 采用相同的 error detection + hint 模式,改进 toString/error 处理方式
参考 #94532 — 该 PR 尝试在 gateway 端做 idempotent 修复但引用了不存在的 getPairedNode 函数