Answer stability round 1: 0 🔴, 4 🟡 (0 misread); the driver decides what parses so a multi-host DSN still works, and the nine-key test shrinks to four

This commit is contained in:
2026-10-31 13:56:46 +01:00
parent b8686377c9
commit 8ffbb0b70d
7 changed files with 25 additions and 26 deletions
+2 -3
View File
@@ -99,9 +99,8 @@ function readEnum<T extends string>(env: Env, key: string, allowed: readonly T[]
}
// Never echoes the value: a DSN whose password breaks URL parsing (a bare "/") would put the
// password in the boot error and the log. bootstrap uses it too, before the postgres driver, which
// rethrows a malformed DSN with the whole string attached.
export function assertUrl(key: string, value: string): void {
// password in the boot error and the log.
function assertUrl(key: string, value: string): void {
try {
new URL(value);
} catch {