refactor: dedupe probe error formatting

This commit is contained in:
Peter Steinberger
2026-04-07 01:10:35 +01:00
parent 533bd00001
commit 325ff24bae
12 changed files with 25 additions and 13 deletions

View File

@@ -1,4 +1,5 @@
import crypto from "node:crypto";
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
import { fetchWithSsrFGuard } from "../runtime-api.js";
import type { ResolvedGoogleChatAccount } from "./accounts.js";
import { getGoogleChatAccessToken } from "./auth.js";
@@ -313,7 +314,7 @@ export async function probeGoogleChat(account: ResolvedGoogleChatAccount): Promi
} catch (err) {
return {
ok: false,
error: err instanceof Error ? err.message : String(err),
error: formatErrorMessage(err),
};
}
}