Skip to content

Conversation

@maltehuebner
Copy link
Contributor

Summary

  • Add 10-second timeout to OWM HTTP requests to prevent indefinite hangs
  • Validate JSON response structure in JsonParser before accessing properties

Problem

  1. HTTP requests to OpenWeatherMap had no timeout — a slow or unresponsive API could block PHP workers indefinitely
  2. JsonParser accessed response properties ($uvValue->value, $temperatureValue->main->temp) without checking they exist — if the API changes format, this crashes with an unclear property access error

Test plan

🤖 Generated with Claude Code

maltehuebner and others added 2 commits February 8, 2026 11:34
The JsonParser accessed response properties like \$uvValue->value and
\$temperatureValue->main->temp without checking their existence. If
the API changes its response format, this would cause an uncaught
property access error. Now throws a clear RuntimeException instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
HTTP requests to OpenWeatherMap had no explicit timeout, so they
could hang indefinitely and block PHP processes. Add a 10-second
timeout to both UV index and temperature queries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant