openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
13 lines (12 loc) • 556 B
JavaScript
import { n as formatErrorMessageWithCode } from "./errors-Db3Ymjlb.js";
import { d as errorShape } from "./error-codes-Bo8q2D1o.js";
import { n as copyErrorDiagnostic } from "./error-diagnostics-BM-F2vsk.js";
//#region src/gateway/error-shape.ts
/** Builds a wire error from an unknown failure without diagnostic class names. */
function errorShapeFromError(code, error, opts) {
const shape = errorShape(code, formatErrorMessageWithCode(error), opts);
copyErrorDiagnostic(error, shape);
return shape;
}
//#endregion
export { errorShapeFromError as t };