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