normalizers: Updated error handling within the JSON helper function.

This commit is contained in:
2026-01-15 20:17:46 -06:00
parent d8db58c004
commit a341aee5df
3 changed files with 7 additions and 4 deletions

View File

@@ -56,7 +56,7 @@ func buildObservation(parsed omResponse) (model.WeatherObservation, time.Time, e
if s := strings.TrimSpace(parsed.Current.Time); s != "" {
t, err := parseOpenMeteoTime(s, parsed.Timezone, parsed.UTCOffsetSeconds)
if err != nil {
return model.WeatherObservation{}, time.Time{}, fmt.Errorf("openmeteo observation normalize: parse time %q: %w", s, err)
return model.WeatherObservation{}, time.Time{}, fmt.Errorf("parse time %q: %w", s, err)
}
ts = t.UTC()
}