UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

20 lines (19 loc) • 884 B
import { a as normalizeLowercaseStringOrEmpty } from "./string-coerce-DW4mBlAt.js"; import { i as formatErrorMessage } from "./errors-DNvW4XW_.js"; import "./error-runtime-DwY-woKF.js"; import "./string-coerce-runtime-BtLK_KtO.js"; //#region extensions/matrix/src/matrix/errors.ts function formatMatrixErrorMessage(err) { return formatErrorMessage(err); } function formatMatrixErrorReason(err) { return normalizeLowercaseStringOrEmpty(formatMatrixErrorMessage(err)); } function isMatrixNotFoundError(err) { const errObj = err; if (errObj?.statusCode === 404 || errObj?.body?.errcode === "M_NOT_FOUND") return true; const message = formatMatrixErrorReason(err); return message.includes("m_not_found") || message.includes("[404]") || message.includes("not found"); } //#endregion export { formatMatrixErrorReason as n, isMatrixNotFoundError as r, formatMatrixErrorMessage as t };