fix: error handling
using pointer for noDataFoundError check in Listen method
This commit is contained in:
parent
3129016364
commit
772ee38e0b
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user