openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
12 lines (11 loc) • 649 B
JavaScript
import { s as isGatewayTransportError } from "./transport-error-BL_kuysc.mjs";
import { u as isGatewayCredentialsRequiredError } from "./call-DVCK1deJ.mjs";
//#region src/gateway/call-mutation-fallback.ts
/** Pre-dispatch failures permit local fallback only for the selected local backend. */
function resolveGatewayMutationFallback(e) {
const { error: t, localTarget: n } = e;
const r = isGatewayTransportError(t) && t.kind === "closed" && t.code === void 0 ? "unreachable" : isGatewayCredentialsRequiredError(t) ? "credentials-required" : void 0;
return r && !n ? "non-local" : r;
}
//#endregion
export { resolveGatewayMutationFallback as t };