From 3b9a1edf689e9d0469cc12c0202a18748ef7e748 Mon Sep 17 00:00:00 2001 From: Sacha Al Himdani Date: Fri, 13 Feb 2026 13:03:34 +0100 Subject: [PATCH] Fix small issues Signed-off-by: Sacha Al Himdani --- pkg/coredata/webhook_data_status.go | 10 ++++++---- pkg/coredata/webhook_event_status.go | 10 ++++++---- pkg/webhook/sender.go | 1 - 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/pkg/coredata/webhook_data_status.go b/pkg/coredata/webhook_data_status.go index d759a7bb4..10662edc6 100644 --- a/pkg/coredata/webhook_data_status.go +++ b/pkg/coredata/webhook_data_status.go @@ -52,12 +52,14 @@ func (s *WebhookDataStatus) UnmarshalText(text []byte) error { } func (s *WebhookDataStatus) Scan(value any) error { - str, ok := value.(string) - if !ok { + switch v := value.(type) { + case string: + return s.UnmarshalText([]byte(v)) + case []byte: + return s.UnmarshalText(v) + default: return fmt.Errorf("unsupported type for WebhookDataStatus: %T", value) } - - return s.UnmarshalText([]byte(str)) } func (s WebhookDataStatus) Value() (driver.Value, error) { diff --git a/pkg/coredata/webhook_event_status.go b/pkg/coredata/webhook_event_status.go index 53157bdab..b65e5483c 100644 --- a/pkg/coredata/webhook_event_status.go +++ b/pkg/coredata/webhook_event_status.go @@ -51,12 +51,14 @@ func (s *WebhookEventStatus) UnmarshalText(text []byte) error { } func (s *WebhookEventStatus) Scan(value any) error { - str, ok := value.(string) - if !ok { + switch v := value.(type) { + case string: + return s.UnmarshalText([]byte(v)) + case []byte: + return s.UnmarshalText(v) + default: return fmt.Errorf("unsupported type for WebhookEventStatus: %T", value) } - - return s.UnmarshalText([]byte(str)) } func (s WebhookEventStatus) Value() (driver.Value, error) { diff --git a/pkg/webhook/sender.go b/pkg/webhook/sender.go index 8e0238ca7..93d9d7845 100644 --- a/pkg/webhook/sender.go +++ b/pkg/webhook/sender.go @@ -197,7 +197,6 @@ func (s *Sender) deliverToConfiguration( s.logger.ErrorCtx(ctx, "error delivering webhook", log.Error(sendErr), log.String("webhook_data_id", webhookData.ID.String()), - log.String("endpoint_url", config.EndpointURL), ) }