fix: error handling
using pointer for noDataFoundError check in Listen method
This commit is contained in:
parent
08fc9e5e33
commit
eef3296435
@ -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