log errors only when an error happens (#2029)
This commit is contained in:
parent
47a2f5e8b6
commit
b0ca12e31e
@ -75,20 +75,21 @@ func rootMutation(log *zap.Logger, service *console.Service, mailService *mailse
|
|||||||
|
|
||||||
secret, err := console.RegistrationSecretFromBase64(secretInput)
|
secret, err := console.RegistrationSecretFromBase64(secretInput)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
log.Error("register: failed to parse secret",
|
||||||
|
zap.String("rawSecret", secretInput),
|
||||||
|
zap.Error(err))
|
||||||
|
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Error("register: failed to parse secret",
|
|
||||||
zap.String("rawSecret", secretInput),
|
|
||||||
zap.Error(err))
|
|
||||||
|
|
||||||
user, err := service.CreateUser(p.Context, createUser, secret)
|
user, err := service.CreateUser(p.Context, createUser, secret)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
log.Error("register: failed to create account",
|
||||||
|
zap.String("rawSecret", secretInput),
|
||||||
|
zap.Error(err))
|
||||||
|
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
log.Error("register: failed to create account",
|
|
||||||
zap.String("rawSecret", secretInput),
|
|
||||||
zap.Error(err))
|
|
||||||
|
|
||||||
token, err := service.GenerateActivationToken(p.Context, user.ID, user.Email)
|
token, err := service.GenerateActivationToken(p.Context, user.ID, user.Email)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user