From 17051afc57bacf4ccd53f0a04cbe0e93efbc7e44 Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Fri, 27 Oct 2023 00:05:01 +0200 Subject: [PATCH] fix: :bug: fix usage of errors.Is --- users/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/service.go b/users/service.go index 5201dac..be0a06f 100644 --- a/users/service.go +++ b/users/service.go @@ -78,7 +78,7 @@ func SaveUserToken(ctx context.Context, app *core.App, spotifyID string, token * coll := app.MongoClient.Database("listy").Collection("users") result, err := GetUser(ctx, app, spotifyID) - if err != nil && !errors.Is(mongo.ErrNoDocuments, err) { + if err != nil && !errors.Is(err, mongo.ErrNoDocuments) { return nil, fmt.Errorf("couldn't fetch user %v", err) }