aboutsummaryrefslogtreecommitdiffstats
path: root/docs/superpowers/specs/2026-09-17-weather-widget-design.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/superpowers/specs/2026-09-17-weather-widget-design.md')
-rw-r--r--docs/superpowers/specs/2026-09-17-weather-widget-design.md11
1 files changed, 7 insertions, 4 deletions
diff --git a/docs/superpowers/specs/2026-09-17-weather-widget-design.md b/docs/superpowers/specs/2026-09-17-weather-widget-design.md
index 412adac..60fa7d9 100644
--- a/docs/superpowers/specs/2026-09-17-weather-widget-design.md
+++ b/docs/superpowers/specs/2026-09-17-weather-widget-design.md
@@ -174,10 +174,13 @@ single transient failure does not flag the card.
The fetch script exits non-zero with a message on stderr when the key is
missing or curl fails, and **leaves any existing cache untouched** rather than
-overwriting it with an error body. OWM returns HTTP 200 with a JSON error body
-for a bad key, so the script checks that `.cod` is 200 before replacing the
-cache. That check is carried over from the reference script, which learned it
-the same way.
+overwriting it with an error body.
+
+The script checks `.cod` is 200 before replacing the cache, behind `curl -f`.
+Measured against the live API, a bad key returns 401 and an unknown city 404,
+so `-f` rejects both before `.cod` is read; the check covers the remaining case
+of a 200 whose body is not usable weather. The reference script needed it as
+its only defence because it ran curl without `-f`.
## Secrets and personal data