From 40a0da5bd7c0e9dcd0fec017bdb593713dc138c6 Mon Sep 17 00:00:00 2001 From: Denis Arh Date: Wed, 16 Dec 2020 11:45:13 +0100 Subject: [PATCH] Fix errors on internal login --- system/service/auth.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/system/service/auth.go b/system/service/auth.go index ef503f582..d1b78626d 100644 --- a/system/service/auth.go +++ b/system/service/auth.go @@ -429,7 +429,9 @@ func (svc auth) InternalLogin(ctx context.Context, email string, password string ) u, err = store.LookupUserByEmail(ctx, svc.store, email) - if err != nil { + if errors.IsNotFound(err) { + return AuthErrInvalidCredentials(aam) + } else if err != nil { return err }