fix(gateway): satisfy server-method lint

This commit is contained in:
Peter Steinberger
2026-02-16 01:15:31 +00:00
parent dc5d234848
commit 71cee673b2
2 changed files with 10 additions and 2 deletions

View File

@@ -46,7 +46,15 @@ import { resolveSessionKeyFromResolveParams } from "../sessions-resolve.js";
import { assertValidParams } from "./validation.js";
function requireSessionKey(key: unknown, respond: RespondFn): string | null {
const normalized = String(key ?? "").trim();
const raw =
typeof key === "string"
? key
: typeof key === "number"
? String(key)
: typeof key === "bigint"
? String(key)
: "";
const normalized = raw.trim();
if (!normalized) {
respond(false, undefined, errorShape(ErrorCodes.INVALID_REQUEST, "key required"));
return null;