Improve error messaging for secrets detection configuration validation on startup
authormaximiliancw <redacted>
Fri, 9 Jan 2026 14:38:08 +0000 (15:38 +0100)
committermaximiliancw <redacted>
Fri, 9 Jan 2026 14:38:08 +0000 (15:38 +0100)
src/index.ts

index a1e43582c3891890df7de005095af698779dafc1..504104fd6a777f3cc3214c310e685a111562f947 100644 (file)
@@ -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);
   }
git clone https://git.99rst.org/PROJECT