From: maximiliancw Date: Fri, 9 Jan 2026 14:38:08 +0000 (+0100) Subject: Improve error messaging for secrets detection configuration validation on startup X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=be80f0898e69514b0e8027e5bd694aa54dcfc44a;p=sgasser-llm-shield.git Improve error messaging for secrets detection configuration validation on startup --- diff --git a/src/index.ts b/src/index.ts index a1e4358..504104f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -96,10 +96,10 @@ async function validateStartup() { // Validate secrets detection configuration if (config.secrets_detection.action === "route_local" && config.mode === "mask") { console.error("\n❌ Configuration error detected!\n"); + console.error(" secrets_detection.action 'route_local' is not compatible with mode 'mask'."); console.error( - " secrets_detection.action 'route_local' is not compatible with mode 'mask'.", + " Use mode 'route' or change secrets_detection.action to 'block' or 'redact'.\n", ); - console.error(" Use mode 'route' or change secrets_detection.action to 'block' or 'redact'.\n"); console.error("[STARTUP] ✗ Invalid configuration. Exiting for safety."); process.exit(1); }