mirror of
https://github.com/yattee/yattee.git
synced 2026-06-04 13:54:19 +00:00
When an instance sits behind a reverse proxy that requires HTTP Basic Auth, every detection probe (/info, /api/v1/config, /api/v1/stats, /healthcheck, /config) returns 401 before reaching the real backend, so the type cannot be identified. Re-throw APIError.unauthorized from each probe instead of swallowing it, and have detectWithResult convert the first 401 it sees into DetectionError.basicAuthRequired. Add a basicAuthHeader parameter so the caller can retry detection after the user provides credentials; if a retry also returns 401, surface basicAuthInvalid instead.