Skip to content

Commit 85d00c7

Browse files
committed
fix(sso): log DNS infrastructure failures at error so prod actually surfaces them
Production's default minimum log level is ERROR, so the warn introduced in the previous commit was still filtered out — the fault stayed invisible exactly as before. A resolver failure that is not 'record absent' is a genuine infrastructure error, so ERROR is both the visible and the honest severity.
1 parent 8260b49 commit 85d00c7

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

apps/sim/lib/auth/sso/domain-verification.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,13 @@ export async function checkDomainTxtRecord(domain: string, token: string): Promi
121121
if (code && RECORD_ABSENT_DNS_CODES.has(code)) {
122122
logger.debug('TXT verification record not published yet', { host, code })
123123
} else {
124-
// Not a missing record — our resolver path is failing (blocked egress,
125-
// timeout, SERVFAIL). Log at warn: production log level is ERROR-only, so
126-
// a debug line here would make infrastructure faults invisible and be
127-
// misreported to the admin as "record not found yet".
128-
logger.warn('TXT verification lookup failed for an infrastructure reason', {
124+
// Not a missing record — our resolver path itself is failing (blocked
125+
// egress, timeout, SERVFAIL). Log at ERROR, not warn: the default minimum
126+
// level in production is ERROR, so anything below it is dropped and the
127+
// fault stays invisible while the admin is told their record "isn't
128+
// published yet". This is a genuine infrastructure fault, so ERROR is also
129+
// the honest severity.
130+
logger.error('TXT verification lookup failed for an infrastructure reason', {
129131
host,
130132
code,
131133
error: getErrorMessage(error),

0 commit comments

Comments
 (0)