mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-04 23:45:07 +00:00
fix: correct error messages for policy queries (#8722)
# Which Problems Are Solved Errors messages are mixed up for some policies # How the Problems Are Solved Define new error IDs and correct the messages. # Additional Changes None # Additional Context None
This commit is contained in:
parent
c0615e95e2
commit
5e57d3bebb
@ -173,9 +173,9 @@ func prepareLockoutPolicyQuery(ctx context.Context, db prepareDatabase) (sq.Sele
|
||||
)
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, zerrors.ThrowNotFound(err, "QUERY-63mtI", "Errors.PasswordComplexityPolicy.NotFound")
|
||||
return nil, zerrors.ThrowNotFound(err, "QUERY-38pZnUemLP", "Errors.IAM.PasswordLockoutPolicy.NotFound")
|
||||
}
|
||||
return nil, zerrors.ThrowInternal(err, "QUERY-uulCZ", "Errors.Internal")
|
||||
return nil, zerrors.ThrowInternal(err, "QUERY-PJURxRUoYG", "Errors.Internal")
|
||||
}
|
||||
return policy, nil
|
||||
}
|
||||
|
@ -176,9 +176,9 @@ func preparePasswordAgePolicyQuery(ctx context.Context, db prepareDatabase) (sq.
|
||||
)
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, zerrors.ThrowNotFound(err, "QUERY-63mtI", "Errors.Org.PasswordComplexity.NotFound")
|
||||
return nil, zerrors.ThrowNotFound(err, "QUERY-ShCWRnWJfH", "Errors.IAM.PasswordAgePolicy.NotFound")
|
||||
}
|
||||
return nil, zerrors.ThrowInternal(err, "QUERY-uulCZ", "Errors.Internal")
|
||||
return nil, zerrors.ThrowInternal(err, "QUERY-6nj7Bm4fxT", "Errors.Internal")
|
||||
}
|
||||
return policy, nil
|
||||
}
|
||||
|
@ -198,9 +198,9 @@ func preparePasswordComplexityPolicyQuery(ctx context.Context, db prepareDatabas
|
||||
)
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, zerrors.ThrowNotFound(err, "QUERY-63mtI", "Errors.PasswordComplexity.NotFound")
|
||||
return nil, zerrors.ThrowNotFound(err, "QUERY-hgA9vuM0qg", "Errors.IAM.PasswordComplexityPolicy.NotFound")
|
||||
}
|
||||
return nil, zerrors.ThrowInternal(err, "QUERY-uulCZ", "Errors.Internal")
|
||||
return nil, zerrors.ThrowInternal(err, "QUERY-TvvW9Uij7M", "Errors.Internal")
|
||||
}
|
||||
return policy, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user