Sign-in: log why the mail server couldn't be reached #69

Merged
jcoffey-dev merged 1 commits from fix/signin-log-cause into main 2026-10-13 05:52:53 +00:00
Owner

When fetch can't reach the mail server at all (DNS, a refused connection, a certificate Node doesn't trust), its message is only "fetch failed" and the reason sits on err.cause. The sign-in and token-refresh warnings logged only the message, so an operator whose proxy never saw the request had nothing to go on. Reported in https://community.coffeylabs.org/t/webmail-failing-to-access-server/122.

failureReason() in upstream.ts adds the cause, e.g. fetch failed (UNABLE_TO_VERIFY_LEAF_SIGNATURE: unable to verify the first certificate). Used at the four sign-in/refresh warnings in app.ts. Typecheck, tests and build pass locally; new tests in server/src/failurereason.test.ts.

No new strings.

When fetch can't reach the mail server at all (DNS, a refused connection, a certificate Node doesn't trust), its message is only "fetch failed" and the reason sits on `err.cause`. The sign-in and token-refresh warnings logged only the message, so an operator whose proxy never saw the request had nothing to go on. Reported in https://community.coffeylabs.org/t/webmail-failing-to-access-server/122. `failureReason()` in upstream.ts adds the cause, e.g. `fetch failed (UNABLE_TO_VERIFY_LEAF_SIGNATURE: unable to verify the first certificate)`. Used at the four sign-in/refresh warnings in app.ts. Typecheck, tests and build pass locally; new tests in server/src/failurereason.test.ts. No new strings.
jcoffey-dev added 1 commit 2026-10-13 05:47:41 +00:00
Sign-in: log why the mail server couldn't be reached
ci / node (pull_request) Skipped
ci / version (pull_request) Skipped
ci / docker-build (pull_request) Skipped
ci / publish (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 2m23s
ci / announce (pull_request) Skipped
c19714182f
When fetch can't reach the mail server at all (DNS, a refused connection, a certificate Node doesn't trust), its message is only "fetch failed" and the reason is on err.cause. The sign-in and token-refresh warnings logged the message alone, so an operator whose proxy never saw the request had nothing to go on (community thread 122). They now add the cause, e.g. "fetch failed (UNABLE_TO_VERIFY_LEAF_SIGNATURE: unable to verify the first certificate)".
jcoffey-dev merged commit 26c2f223fa into main 2026-10-13 05:52:53 +00:00
jcoffey-dev deleted branch fix/signin-log-cause 2026-10-13 05:52:53 +00:00
Sign in to join this conversation.