mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 20:42:43 +00:00
When `MAXMIND_LICENSE_KEY` is unset the script still drops the `.empty` marker and exits 0 — that path is the deliberate maintainer override and the runtime resilience layer in `src/lib/geo.ts` carries it. When the key IS set, every failure mode now bubbles up: - A curl error (401 wrong-key, 403 throttle, 5xx upstream, network drop) returns the curl exit code instead of swallowing it into a fallback `.empty` marker. The diagnostic names the most common causes so the operator can act without re-reading the script. - A tar extraction failure or a missing MMDB inside the tarball returns 1 with a matching message. - A final assertion at end-of-script confirms both `GeoLite2-City.mmdb` and `GeoLite2-ASN.mmdb` ended up non-empty in the output directory; otherwise exit 1. Smoke-tested locally: no-key invocation still exits 0 with the `.empty` marker; a deliberately bad key now exits 22 with the curl 401 surfaced.