mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-27 00:17:29 +00:00
refactor: dedupe provider bootstrap error formatting
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
||||
import type { OpenClawConfig, OpenClawPluginApi } from "../api.js";
|
||||
import { applyMemoryWikiMutation, normalizeMemoryWikiMutationInput } from "./apply.js";
|
||||
import { compileMemoryWikiVault } from "./compile.js";
|
||||
@@ -78,7 +79,7 @@ function readEnumParam<T extends string>(
|
||||
}
|
||||
|
||||
function respondError(respond: GatewayRespond, error: unknown) {
|
||||
const message = error instanceof Error ? error.message : String(error);
|
||||
const message = formatErrorMessage(error);
|
||||
respond(false, undefined, { code: "internal_error", message });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user