UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

3 lines • 2.33 kB
import{l as resolveGlobalSingleton}from"./string-coerce-BBqv4GXj.mjs"; //!src/infra/gateway-state-owner-errors.ts const GATEWAY_STATE_PROCESS_OWNER_RETIRED_MESSAGE=`OpenClaw state process owner is no longer current`;function createGatewayStateProcessOwnerRetiredError(){return/* @__PURE__ */ new Error(GATEWAY_STATE_PROCESS_OWNER_RETIRED_MESSAGE)}const StateDatabaseAccessError=resolveGlobalSingleton(Symbol.for(`openclaw.stateDatabaseAccessError`),()=>class extends Error{constructor(...e){super(...e);this.name=`StateDatabaseAccessError`}});const GatewayStateOwnerContentionError=resolveGlobalSingleton(Symbol.for(`openclaw.gatewayStateOwnerContentionError`),()=>class StateOwnerContentionError extends Error{constructor(e,t,n,r){super(`OpenClaw state database is busy at ${e}. ${n?`${n} `:``}Wait for the other OpenClaw process to finish, then retry. If it persists, run \`openclaw gateway status\` and check for other OpenClaw processes using the same state directory. A running Gateway can hold this ownership until it stops; stop it through its service manager or original terminal before retrying.`);this.databasePath=e;this.cause=t;this.holderDetail=n;this.holder=r;this.name=`GatewayStateOwnerContentionError`}});const StateDatabaseMaintenanceScopeError=resolveGlobalSingleton(Symbol.for(`openclaw.stateDatabaseMaintenanceScopeError`),()=>class extends StateDatabaseAccessError{constructor(e){super(`Internal state ownership error at ${e}: this process holds maintenance ownership without an active schema lease or maintenance scope. Retry the command; if it persists, report this error.`);this.name=`StateDatabaseMaintenanceScopeError`}});const StateDatabaseAdmissionPendingError=resolveGlobalSingleton(Symbol.for(`openclaw.stateDatabaseAdmissionPendingError`),()=>class extends StateDatabaseAccessError{constructor(e,t){super(t);this.databasePath=e}});const StateDatabaseOfflineMaintenanceError=resolveGlobalSingleton(Symbol.for(`openclaw.stateDatabaseOfflineMaintenanceError`),()=>class extends StateDatabaseAccessError{constructor(e,t){super(t);this.databasePath=e}});export{StateDatabaseOfflineMaintenanceError as a,StateDatabaseMaintenanceScopeError as i,StateDatabaseAccessError as n,createGatewayStateProcessOwnerRetiredError as o,StateDatabaseAdmissionPendingError as r,GatewayStateOwnerContentionError as t};