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

@@ -48,7 +48,7 @@ func buildObservation(parsed nwsObservationResponse) (model.WeatherObservation,
if s := strings.TrimSpace(parsed.Properties.Timestamp); s != "" {
t, err := time.Parse(time.RFC3339, s)
if err != nil {
return model.WeatherObservation{}, time.Time{}, fmt.Errorf("nws observation normalize: invalid timestamp %q: %w", s, err)
return model.WeatherObservation{}, time.Time{}, fmt.Errorf("invalid timestamp %q: %w", s, err)
}
ts = t
}