diegosouzapw/OmniRoute · error · Error
API_KEY_SECRET is required for API key CRC operations. The s
Error message
API_KEY_SECRET is required for API key CRC operations. The startup validator (instrumentation-node.ts) should have set this automatically.
What it means
Error "API_KEY_SECRET is required for API key CRC operations. The startup validator (instrumentation-node.ts) should have set this automatically." thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/shared/utils/apiKey.ts:11
import crypto from "crypto";
// FASE-01: No hardcoded fallback — enforced by secretsValidator at startup
if (!process.env.API_KEY_SECRET) {
console.error("[SECURITY] API_KEY_SECRET is not set. API key CRC validation is disabled.");
}
function getApiKeySecret(): string {
const secret = process.env.API_KEY_SECRET;
if (!secret || secret.trim() === "") {
throw new Error(
"API_KEY_SECRET is required for API key CRC operations. " +
"The startup validator (instrumentation-node.ts) should have set this automatically."
);
}
return secret;
}
/**
* Generate 6-char random keyId
*/
function generateKeyId(): string {
const chars = "abcdefghijklmnopqrstuvwxyz0123456789";
let result = "";
result = crypto.randomBytes(3).toString("hex");
return result;
}
/**View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/shared/utils/apiKey.ts:11 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/6a2b1a5f279a7fe7.
Report an issue: GitHub.