openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
10 lines (9 loc) • 366 B
JavaScript
import { t as truncateUtf8Prefix } from "./utf8-truncate-BH7Ecfuh.mjs";
//#region src/gateway/server/close-reason.ts
/** Truncates close reasons to the RFC-safe byte limit used during handshake failures. */
function truncateCloseReason(e) {
if (!e) return "invalid handshake";
return truncateUtf8Prefix(e, 120);
}
//#endregion
export { truncateCloseReason as t };