fix: error handling

using pointer for noDataFoundError check in Listen method
This commit is contained in:
SoXX 2024-08-24 23:59:42 +02:00
parent 08fc9e5e33
commit eef3296435

View File

@ -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 {