openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
3 lines • 1.17 kB
JavaScript
import{a as extractErrorCode,r as collectErrorGraphCandidates,u as readErrorCauses}from"./error-coercion-DlKnt6w-.mjs";import{t as formatErrorMessage}from"./errors-D37BJTfI.mjs";import{n as formatSqliteErrorCodeSuffix}from"./sqlite-error-diagnostics-ASl1MXPN.mjs";
//!src/infra/gateway-lock-diagnostics.ts
function formatGatewayLockFailure(e){const t=collectErrorGraphCandidates(e,readErrorCauses);const n=new Set(t.map(extractErrorCode));let r=``;if(n.has(`EACCES`)||n.has(`EPERM`))r=`Check ownership and write permissions for the reported lock path under the OpenClaw user; containers need a writable state mount.`;else if(n.has(`ENOSPC`))r=`Free space or inodes on the filesystem containing the reported lock path, then retry.`;else if(n.has(`ENOSYS`))r=`The required filesystem operation is unavailable. Upgrade OpenClaw and the container host/kernel, then retry.`;else if(n.has(`ENOTSUP`)||n.has(`EOPNOTSUPP`))r=`Stop OpenClaw, back up the state directory, and use a local filesystem that supports exclusive file creation for state ownership.`;return`${formatErrorMessage(e)}${formatSqliteErrorCodeSuffix(e)}${r?`. ${r}`:``}`}export{formatGatewayLockFailure as t};