From 772ee38e0bdd8e47cab81737ab99d0032dd2fb4a Mon Sep 17 00:00:00 2001 From: SoXX Date: Sat, 24 Aug 2024 23:59:42 +0200 Subject: [PATCH] fix: error handling using pointer for noDataFoundError check in Listen method --- pkg/plug/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/plug/server.go b/pkg/plug/server.go index ccdfa4e..e29fc7a 100644 --- a/pkg/plug/server.go +++ b/pkg/plug/server.go @@ -54,7 +54,7 @@ func (p *Plug) Listen() error { source, err = database.GetSourceByDomain(p.ctx, p.source.Domain) if err != nil { - if errors.Is(err, noDataFoundError) { + if errors.Is(err, &noDataFoundError) { log.Printf("Initalizing source!") source, err = database.CreateSource(p.ctx, p.source) if err != nil {