normalizers: Updated error handling within the JSON helper function.
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user