fix: stabilize qa lab docker builds

This commit is contained in:
Peter Steinberger
2026-04-07 06:06:19 +01:00
parent ce1d2c1004
commit 7a2abb1c50
4 changed files with 36 additions and 1 deletions

View File

@@ -62,6 +62,7 @@ RUN corepack enable
WORKDIR /app
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc ./
COPY openclaw.mjs ./
COPY ui/package.json ./ui/package.json
COPY patches ./patches
COPY scripts/postinstall-bundled-plugins.mjs scripts/npm-runner.mjs scripts/windows-cmd-helpers.mjs ./scripts/

View File

@@ -1,4 +1,4 @@
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
import { formatErrorMessage } from "./errors.js";
import {
type Bootstrap,
type OutcomesEnvelope,

View File

@@ -0,0 +1,33 @@
export function formatErrorMessage(err: unknown): string {
if (err instanceof Error) {
let formatted = err.message || err.name || "Error";
let cause: unknown = err.cause;
const seen = new Set<unknown>([err]);
while (cause && !seen.has(cause)) {
seen.add(cause);
if (cause instanceof Error) {
if (cause.message) {
formatted += ` | ${cause.message}`;
}
cause = cause.cause;
continue;
}
if (typeof cause === "string") {
formatted += ` | ${cause}`;
}
break;
}
return formatted;
}
if (typeof err === "string") {
return err;
}
if (typeof err === "number" || typeof err === "boolean" || typeof err === "bigint") {
return String(err);
}
try {
return JSON.stringify(err);
} catch {
return Object.prototype.toString.call(err);
}
}

View File

@@ -15,6 +15,7 @@ RUN --mount=type=cache,id=openclaw-cleanup-smoke-apt-cache,target=/var/cache/apt
WORKDIR /repo
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc ./
COPY openclaw.mjs ./
COPY ui/package.json ./ui/package.json
COPY packages ./packages
COPY extensions ./extensions