Files
worldmonitor/docs/api/ClimateService.openapi.json
Fayez Bast 8609ad1384 feat: " climate disasters alerts seeders " (#2550)
* Revert "Revert "feat(climate): add climate disasters seed + ListClimateDisast…"

This reverts commit ae4010a795.

* feat(climate):add-disaster-alerts-seeder

* fix(climate): review fixes for climate disasters seeder

- Bump CACHE_TTL from 6h to 18h (gold standard: TTL >= 3x cron interval)
- Log warning when ReliefWeb rows all map to null (aids debugging schema changes)
- Anchor getNaturalSourceMeta to known source names/URLs (prevents false positives)
- Normalize seed output to camelCase (matches proto field names, simplifies handler)

* fix(climate): fail hard on config errors, drop Null Island records

- Config errors (missing RELIEFWEB_APPNAME) now propagate through
  collectDisasterSourceResults instead of being tolerated as partial
  failures. Transient errors (e.g. natural cache unavailable) are
  still tolerated.
- Drop ReliefWeb and natural-event records with no resolvable country
  code instead of emitting (0,0) Null Island points.
- Add test for config error hard-fail behavior.

* fix(climate): tag rejected appname as config error for hard-fail

fetchReliefWeb now tags HTTP 401/403 responses as isConfigError,
so collectDisasterSourceResults fails the entire seed instead of
tolerating it as a partial failure. Covers both missing and
invalid/unapproved RELIEFWEB_APPNAME cases.

* chore: regenerate OpenAPI spec after merge

---------

Co-authored-by: Elie Habib <elie.habib@gmail.com>
2026-04-04 23:18:53 +04:00

14 KiB