Skip to content

Commit

Permalink
Work around occasional OWM API errors (#27)
Browse files Browse the repository at this point in the history
# Description
Mark minutely weather response data as optional

# Issues
Closes #28 

# Other Notes
The [API docs](https://openweathermap.org/api/one-call-3#parameter)
indicate the `minutely` data should always be present in a response, but
in practice it is sometimes missing. Neon does not currently use this
part of the response, so HANA will now treat it as optional.

Co-authored-by: Daniel McKnight <[email protected]>
  • Loading branch information
NeonDaniel and NeonDaniel authored May 22, 2024
1 parent 21122a7 commit 51628bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neon_hana/schema/api_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class WeatherAPIOnecallResponse(BaseModel):
timezone: str
timezone_offset: int
current: Dict[str, Any]
minutely: List[dict]
minutely: Optional[List[dict]]
hourly: List[dict]
daily: List[dict]

Expand Down

0 comments on commit 51628bc

Please sign in to comment.