From a341aee5df9505d1b4b25d7aefe49fcf9230c651 Mon Sep 17 00:00:00 2001 From: Eric Rakestraw Date: Thu, 15 Jan 2026 20:17:46 -0600 Subject: [PATCH] normalizers: Updated error handling within the JSON helper function. --- internal/normalizers/common/json.go | 7 +++++-- internal/normalizers/nws/observation.go | 2 +- internal/normalizers/openmeteo/observation.go | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/internal/normalizers/common/json.go b/internal/normalizers/common/json.go index 29a74ff..1f7f483 100644 --- a/internal/normalizers/common/json.go +++ b/internal/normalizers/common/json.go @@ -42,6 +42,10 @@ func DecodeJSONPayload[T any](in event.Event) (T, error) { // label should be short and specific, e.g. "openweather observation". // outSchema should be the canonical schema constant. // build should contain ONLY provider/domain mapping logic. +// +// Error policy: +// - NormalizeJSON wraps ALL failures with consistent context: "