Commit graph

2 commits

Author SHA1 Message Date
e61f9c6336 fix(uds-auth): keep login error codes on QR login, name the scanned empNo (0.3.17)
Some checks are pending
ci / test (push) Waiting to run
ci / test-postgresql (push) Waiting to run
0.3.16 mapped every post-scan failure to login_finalize_failed, hiding
codes with their own message (bootstrap_required, account_disabled,
registration_closed). Pass those through again and only fall back for
unknown errors.

The bootstrap_required message now includes the scanned employee number
and how to proceed (UDS_AUTH_INITIAL_ADMIN or emergency account login).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 14:24:11 +08:00
08a5520791 fix(uds-auth): surface real cause of QR login network errors (0.3.16)
Some checks are pending
ci / test (push) Waiting to run
ci / test-postgresql (push) Waiting to run
The QR poll showed a generic "network error" for any failure, and the
server collapsed every upstream failure into an opaque 502 with no log.

- Classify upstream failures (DNS, timeout, unreachable, TLS cert, HTTP
  status, bad response) and return host-specific localized messages.
- Report why the post-scan user lookup failed instead of a generic
  invalid-credentials error.
- Log the real errno/message server-side for every qr-proxy failure.
- Show the server message in the QR poll UI; keep "network error" only
  for failed local fetches.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 13:34:23 +08:00